i965/nir: Do optimizations again just before lowering source mods.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 20 Jan 2015 06:11:39 +0000 (22:11 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 23 Jan 2015 22:53:25 +0000 (14:53 -0800)
commitfaa38e16aadd9f2a2416fcb5087d7f8fc8178bf2
treedc9d04684bf18ce719160185ccd5913885f93996
parent9b5efac4617d29bdd8a4cfb64acb84c8c0817c23
i965/nir: Do optimizations again just before lowering source mods.

We want to run CSE and algebraic optimizations again after lowering IO.
Some of the passes in the optimization loop don't handle saturates and
other modifiers, so run it before lowering to source modifiers.

total instructions in shared programs: 6046190 -> 6045768 (-0.01%)
instructions in affected programs:     22406 -> 21984 (-1.88%)
helped:                                47
HURT:                                  0
GAINED:                                0
LOST:                                  0

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp