glsl: Move 'foo = foo;' optimization to opt_dead_code_local
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 21 Sep 2017 00:51:39 +0000 (19:51 -0500)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 2 Oct 2017 21:46:11 +0000 (14:46 -0700)
commitff5254bf089cdf032465eac225954fe046154cc1
tree91a1b7533b5a6a1af332550c4f774c59663c01fd
parent623002f0b2d3a0b65d5dc6c5de9060adf0f3658f
glsl: Move 'foo = foo;' optimization to opt_dead_code_local

The optimization as done in opt_copy_propagation would have to be
removed in the next patch.  If we just eliminate that optimization
altogether, shader-db results, even on platforms that use NIR, are hurt
quite substantially.  I have not investigated why NIR isn't picking up
the slack here.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/glsl/opt_copy_propagation.cpp
src/compiler/glsl/opt_dead_code_local.cpp