nir/cf: clean up jumps when cleaning up CF nodes
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 22 Jul 2015 02:54:28 +0000 (19:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Aug 2015 20:31:42 +0000 (13:31 -0700)
commit6d028749ac593b6c724ab86a42bf969da47cc569
tree8a5afb250715d8369a8baab676b10e1066c21ae8
parent211c79515d2d4cde12cc6a19bb064692b2de3f26
nir/cf: clean up jumps when cleaning up CF nodes

We may delete a control flow node which contains structured jumps to
other parts of the program. We need to remove the jump as a predecessor,
as well as remove any phi node sources which reference it. Right now,
the same problem exists for blocks that don't end in a jump instruction,
but with the new API it shouldn't be an issue, since blocks that don't
end in a jump must either point to another block in the same extracted
CF list or not point to anything at all.

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