nir/repair_ssa: fixup for new foreach_block()
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 12 Apr 2016 19:06:20 +0000 (15:06 -0400)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 28 Apr 2016 22:52:17 +0000 (15:52 -0700)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_repair_ssa.c

index 336f7d59a4e6aedfe7275130af9ea3e9e416f85d..ac0bce1fb4df74f624e0c897c204178ca2f91562 100644 (file)
@@ -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_call(impl, repair_ssa_block, &state);
+   nir_foreach_block(block, impl) {
+      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 |