nir: Make nir_foo_first/last_cf_node return a block instead
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 6 Oct 2016 02:08:57 +0000 (19:08 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 6 Oct 2016 16:16:37 +0000 (09:16 -0700)
commit2ed17d46de045404042f13c6591895a1cf31b167
treea3ae65b79f04ef673578382c631a045f371428e8
parent7a3bcadf4e665ff80775f520715061f4e3d63823
nir: Make nir_foo_first/last_cf_node return a block instead

One of NIR's invariants is that control flow lists always start and end
with blocks.  There's no good reason why we should return a cf_node from
these functions since we know that it's always a block.  Making it a block
lets us remove a bunch of code.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_control_flow.c
src/compiler/nir/nir_lower_indirect_derefs.c
src/compiler/nir/nir_opt_dead_cf.c
src/compiler/nir/nir_opt_peephole_select.c
src/compiler/nir/nir_validate.c
src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c
src/gallium/drivers/vc4/vc4_program.c