nir: make cleanup_cf_node() not use remove_defs_uses()
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 22 Jul 2015 02:54:17 +0000 (19:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Aug 2015 20:31:41 +0000 (13:31 -0700)
commit1c53f89696124de2c7e93665ef8b07bc17b2cb86
tree624df22dcd2f35cf2c5d4c7b26e96d0e57755cea
parent9d5944053ca7bed58b299211fe8028274d480b5b
nir: make cleanup_cf_node() not use remove_defs_uses()

cleanup_cf_node() is part of the control flow modification code, which
we're going to split into its own file, but remove_defs_uses() is an
internal function used by nir_instr_remove(). Break the dependency by
making cleanup_cf_node() use nir_instr_remove() instead, which simply
calls remove_defs_uses() and then removes the instruction from the list.
nir_instr_remove() does do extra things for jumps, though, so we avoid
calling it on jumps which matches the previous behavior (this will be
fixed later in the series).

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