nir/cf: handle jumps better in stitch_blocks()
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 22 Jul 2015 02:54:26 +0000 (19:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Aug 2015 20:31:42 +0000 (13:31 -0700)
commit633cbbc0682b1cec3107398a21a057697e8572aa
treeb63a5b1d23d59e843d082370b8acf877bfa78013
parent940873bf22c90db79d065f14ff44dab12415feb0
nir/cf: handle jumps better in stitch_blocks()

In particular, handle the case where the earlier block ends in a jump
and the later block is empty. In that case, we want to preserve the jump
and remove any traces of the later block. Before, we would only hit this
case when removing a control flow node after a jump, which wasn't a
common occurance, but we'll need it to handle inserting a control flow
list which ends in a jump, which should be more common/useful.

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