summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2016-04-12 14:57:35 -0400
committerJason Ekstrand <[email protected]>2016-04-28 15:52:17 -0700
commite5f37701ab6300c64e02d1c527ccc30fbda32fd3 (patch)
tree514cb1ff654517add9b6f61c92be8b6c61fccaab /src/compiler
parent1ba40d834b652e1d8bedbf2ea34f0c023c5cc27d (diff)
nir/phi_builder: fixup for new foreach_block()
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_phi_builder.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/compiler/nir/nir_phi_builder.c b/src/compiler/nir/nir_phi_builder.c
index 1dd9c621cba..dd489755d62 100644
--- a/src/compiler/nir/nir_phi_builder.c
+++ b/src/compiler/nir/nir_phi_builder.c
@@ -78,14 +78,6 @@ struct nir_phi_builder_value {
nir_ssa_def *defs[0];
};
-static bool
-fill_block_array(nir_block *block, void *void_data)
-{
- nir_block **blocks = void_data;
- blocks[block->index] = block;
- return true;
-}
-
struct nir_phi_builder *
nir_phi_builder_create(nir_function_impl *impl)
{
@@ -99,7 +91,9 @@ nir_phi_builder_create(nir_function_impl *impl)
pb->num_blocks = impl->num_blocks;
pb->blocks = ralloc_array(pb, nir_block *, pb->num_blocks);
- nir_foreach_block_call(impl, fill_block_array, pb->blocks);
+ nir_foreach_block(block, impl) {
+ pb->blocks[block->index] = block;
+ }
exec_list_make_empty(&pb->values);