nir/cf: remove uses of SSA definitions that are being deleted
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 22 Jul 2015 02:54:27 +0000 (19:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Aug 2015 20:31:42 +0000 (13:31 -0700)
commit211c79515d2d4cde12cc6a19bb064692b2de3f26
treec5512b28ea6a875cc56f98f78c19d219568abf18
parent633cbbc0682b1cec3107398a21a057697e8572aa
nir/cf: remove uses of SSA definitions that are being deleted

Unlike calling nir_instr_remove(), calling nir_cf_node_remove() (and
later in the series, the nir_cf_list_delete()) implies that you're
removing instructions that may still have uses, except those
instructions are never executed so any uses will be undefined. When
cleaning up a CF node for deletion, we must clean up any uses of the
deleted instructions by making them point to undef instructions instead.

Signed-off-by: Connor Abbott <connor.w.abbott@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/nir/nir_control_flow.c