[Mesa-dev] [PATCH 37/47] nir/phi_builder: fixup for new foreach_block()

Connor Abbott cwabbott0 at gmail.com
Wed Apr 13 04:35:16 UTC 2016


Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
 src/compiler/nir/nir_phi_builder.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/compiler/nir/nir_phi_builder.c b/src/compiler/nir/nir_phi_builder.c
index a39e360..9a96f84 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(impl, fill_block_array, pb->blocks);
+   nir_foreach_block(impl, block) {
+      pb->blocks[block->index] = block;
+   }
 
    exec_list_make_empty(&pb->values);
 
-- 
2.5.0



More information about the mesa-dev mailing list