nir/cf: split up and improve nir_handle_remove_jumps()
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 22 Jul 2015 02:54:22 +0000 (19:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Aug 2015 20:31:42 +0000 (13:31 -0700)
commit747ddc3cdd51cc3786894e2ba56d86334a7051a5
tree71e5c71ddcc0bf02965446a9bda8b50576edf40e
parent13482111d0dd9649d4b14ed05df344d5a2cea3de
nir/cf: split up and improve nir_handle_remove_jumps()

Before, the process of removing a jump and wiring up the remaining block
correctly was atomic, but with the new control flow modification it's
split into two parts: first, we extract the jump, which creates a new
block with re-wired successors as well as a free-floating jump, and then
we delete the control flow containing the jump, which removes the entry
in the predecessors and any phi node sources. Split up
nir_handle_remove_jumps() to accomodate this, and add the missing
support for removing phi node sources.

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