glsl: Don't copy propagate from SSBO or shared variables either
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 5 Jun 2018 22:04:24 +0000 (15:04 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 14 Jun 2018 18:26:33 +0000 (11:26 -0700)
commit461a5c899c08064467abb635536381a5a5659280
tree02bc4161194e33add4a95607d89131592c91fcb7
parent1d92d6486a7685762f480fb33893b3c3db1fd21a
glsl: Don't copy propagate from SSBO or shared variables either

Since SSBOs can be written by other GPU threads, copy propagating a read
can cause the value to magically change.  SSBO reads are also very
expensive, so doing it twice will be slower.

Haswell, Broadwell, and Skylake had similar results. (Skylake shown)
total instructions in shared programs: 14399120 -> 14399119 (<.01%)
instructions in affected programs: 684 -> 683 (-0.15%)
helped: 1
HURT: 0

total cycles in shared programs: 532978931 -> 532973113 (<.01%)
cycles in affected programs: 530484 -> 524666 (-1.10%)
helped: 1
HURT: 0

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106774
src/compiler/glsl/opt_copy_propagation.cpp