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

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


Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
 src/compiler/nir/nir_repair_ssa.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/compiler/nir/nir_repair_ssa.c b/src/compiler/nir/nir_repair_ssa.c
index 96c791c..f11d458 100644
--- a/src/compiler/nir/nir_repair_ssa.c
+++ b/src/compiler/nir/nir_repair_ssa.c
@@ -101,16 +101,6 @@ repair_ssa_def(nir_ssa_def *def, void *void_state)
    return true;
 }
 
-static bool
-repair_ssa_block(nir_block *block, void *state)
-{
-   nir_foreach_instr_safe(block, instr) {
-      nir_foreach_ssa_def(instr, repair_ssa_def, state);
-   }
-
-   return true;
-}
-
 bool
 nir_repair_ssa_impl(nir_function_impl *impl)
 {
@@ -123,7 +113,11 @@ nir_repair_ssa_impl(nir_function_impl *impl)
    nir_metadata_require(impl, nir_metadata_block_index |
                               nir_metadata_dominance);
 
-   nir_foreach_block(impl, repair_ssa_block, &state);
+   nir_foreach_block(impl, block) {
+      nir_foreach_instr_safe(block, instr) {
+         nir_foreach_ssa_def(instr, repair_ssa_def, &state);
+      }
+   }
 
    if (state.progress)
       nir_metadata_preserve(impl, nir_metadata_block_index |
-- 
2.5.0



More information about the mesa-dev mailing list