OSDN Git Service

nir/opt_if: Remove unneeded phis if we make progress
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 25 Jun 2018 23:18:19 +0000 (16:18 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 Jun 2018 17:47:26 +0000 (10:47 -0700)
commitff6db94c18a585538058df59bd1025463bba2437
treea6e09e1d7f8b88af68d880396b3462e04a9c340e
parentfa42fa1a60debf26cdf86f40c0c805b0fc3b444f
nir/opt_if: Remove unneeded phis if we make progress

Now that SSA values can be derefs and they have special rules, we have
to be a bit more careful about our LCSSA phis.  In particular, we need
to clean up in case LCSSA ended up creating a phi node for a deref.
This fixes validation issues with some Vulkan CTS tests with the new
deref instructions.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/compiler/nir/nir.h
src/compiler/nir/nir_opt_if.c
src/compiler/nir/nir_opt_remove_phis.c