nir/peephole_select: Allow uniform/input loads and load_const
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 16 Mar 2015 22:08:04 +0000 (15:08 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 18 Mar 2015 00:11:05 +0000 (17:11 -0700)
commit27bf37ba05b69ebf6f373d1637a26b4839265921
tree509fb09d09c68b0c436092c07e04d13722e11e56
parent1be862c0c4965a0184908df736a30d354498ba3d
nir/peephole_select: Allow uniform/input loads and load_const

Shader-db results on HSW:

total instructions in shared programs: 4174156 -> 4157291 (-0.40%)
instructions in affected programs:     145397 -> 128532 (-11.60%)
helped:                                383
HURT:                                  0
GAINED:                                20
LOST:                                  22

There are two more tests lost than gained.  However, comparing this with
GLSL IR vs. NIR results, the overall delta is reduced from 85/44
gained/lost on current master to 71/32 with this commit.  Therefore, I
think it's probably a boon since we are getting "closer" to where we were
before.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_opt_peephole_select.c