summaryrefslogtreecommitdiff
path: root/src/compiler/nir/nir_lower_indirect_derefs.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-10-05 19:08:57 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-10-06 09:16:37 -0700
commit2ed17d46de045404042f13c6591895a1cf31b167 (patch)
treea3ae65b79f04ef673578382c631a045f371428e8 /src/compiler/nir/nir_lower_indirect_derefs.c
parent7a3bcadf4e665ff80775f520715061f4e3d63823 (diff)
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>
Diffstat (limited to 'src/compiler/nir/nir_lower_indirect_derefs.c')
-rw-r--r--src/compiler/nir/nir_lower_indirect_derefs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c b/src/compiler/nir/nir_lower_indirect_derefs.c
index 1bf4bf66795..9c5349a772d 100644
--- a/src/compiler/nir/nir_lower_indirect_derefs.c
+++ b/src/compiler/nir/nir_lower_indirect_derefs.c
@@ -80,12 +80,12 @@ emit_indirect_load_store(nir_builder *b, nir_intrinsic_instr *orig_instr,
then_dest->num_components, bit_size, NULL);
nir_phi_src *src0 = ralloc(phi, nir_phi_src);
- src0->pred = nir_cf_node_as_block(nir_if_last_then_node(if_stmt));
+ src0->pred = nir_if_last_then_block(if_stmt);
src0->src = nir_src_for_ssa(then_dest);
exec_list_push_tail(&phi->srcs, &src0->node);
nir_phi_src *src1 = ralloc(phi, nir_phi_src);
- src1->pred = nir_cf_node_as_block(nir_if_last_else_node(if_stmt));
+ src1->pred = nir_if_last_else_block(if_stmt);
src1->src = nir_src_for_ssa(else_dest);
exec_list_push_tail(&phi->srcs, &src1->node);