nir/loop_unroll: Re-materialize derefs in use blocks before unrolling
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 11 Sep 2018 17:51:09 +0000 (12:51 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 19 Sep 2018 06:59:40 +0000 (01:59 -0500)
commit0796c3934ebfe3448acf2d63f478f51c08e33046
tree810f7deb506d3b3ccfd776743f9c2b00cc43ca2e
parent7d1d1208c2b38890fe065b6431ef2e3b7166bae4
nir/loop_unroll: Re-materialize derefs in use blocks before unrolling

When we're about to re-arrange a bunch of blocks, it's a good idea to
make sure that we don't have deref uses crossing block boundaries.
Otherwise we may end up with a deref going through a phi and that would
be bad.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Cc: "18.2" <mesa-stable@lists.freedesktop.org>
src/compiler/nir/nir_opt_loop_unroll.c