i965/fs: emit constants only once
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 25 Jun 2015 23:22:26 +0000 (16:22 -0700)
committerConnor Abbott <cwabbott0@gmail.com>
Tue, 30 Jun 2015 18:18:27 +0000 (11:18 -0700)
commit0ecdf04060518149e99a098caf4f6025fd6482a4
tree1bc2a9350ed7d27d8fc2fc36c531849db7a4d2a6
parent864907e2f14523c130e6ff24c081789bb079bae1
i965/fs: emit constants only once

Before, we would lazily emit a MOV whenever we encountered a use of a
constant. Now that we have a dedicated file for SSA values, we can
instead only emit the MOV's once, which is more consistent and prevents
us from relying on CSE to re-combine the constants when they aren't
absorbed into the instruction.

total instructions in shared programs: 6078991 -> 6073118 (-0.10%)
instructions in affected programs:     402221 -> 396348 (-1.46%)
helped:                                1527
HURT:                                  0
GAINED:                                8
LOST:                                  2

v2: split this out from the previous commit (Jason)

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_nir.cpp