glsl: do second pass of const propagation in loops
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 26 Jun 2018 22:46:53 +0000 (15:46 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 16 Jul 2018 23:33:39 +0000 (16:33 -0700)
commitba1b41b504b9e3867cf4589a55fb69ab4441f041
treed040ed8b14c066cdc5c15bc4f4b0d083c734070c
parentd7849fd1dafafa3489e0be389dabb09502dae26e
glsl: do second pass of const propagation in loops

When handling loops in constant propagation, implement the "FINISHME"
comment like copy propagation: perform a first pass to find values
that can't be propagated, then perform a second pass with the ACP
containing still valid values.

Certain values are killed because the loop may run more than one
iteration, so we can't copy propagate them as they would be invalid in
the later iterations.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/glsl/opt_constant_propagation.cpp