i965/fs: Add support for copy propagation.
authorEric Anholt <eric@anholt.net>
Tue, 8 May 2012 20:01:52 +0000 (13:01 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 14 May 2012 23:53:19 +0000 (16:53 -0700)
commitd7787adda8006506545256547d8d590a282487af
tree4b7591444afcbf2a6a76cb2c65cfb1fb8add53f9
parentf7a71e2570053205eb603aa04b8c52d4f54d8e4c
i965/fs: Add support for copy propagation.

We could do more by handling abs/negate and non-GRF sources, but this is
a good start.  Improves tropics performance 0.30% +/- .17% (n=43).

shader-db results:
Total instructions: 208032 -> 207184
60/1246 programs affected (4.8%)
23286 -> 22438 instructions in affected programs (3.6% reduction)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/Makefile.sources
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_cfg.cpp
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp [new file with mode: 0644]