[Mesa-dev] [PATCH 2/2] prog_optimize: Add reads without writes optimization pass

Eric Anholt eric at anholt.net
Tue Mar 29 10:19:13 PDT 2011

On Mon, 28 Mar 2011 22:59:31 -0700, Tom Stellard <tstellar at gmail.com> wrote:
> This pass scans programs for instructions that read registers that have
> not been written and replaces these reads with a read from a constant
> register with the value of zero.  This pass prevents phantom
> dependencies from being introduced by the register allocator and
> improves the efficiency of subsequent optimization passes.

I'm not sure why optimizing a program with undefined behavior (using
undefined register values) is interesting.  It just seems like an
opportunity to make a mistake and break programs that should have
defined behavior.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110329/7a7f6ab2/attachment.pgp>

More information about the mesa-dev mailing list