nir/validate: fixup for new foreach_block()
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 12 Apr 2016 19:17:46 +0000 (15:17 -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_validate.c

index 0555a0007cff98946d4d96ab96bb41d88640bac2..c7cef6a8095eac187e9544b4e675f91eb80c3091 100644 (file)
@@ -957,15 +957,6 @@ postvalidate_ssa_def(nir_ssa_def *def, void *void_state)
    return true;
 }
 
-static bool
-postvalidate_ssa_defs_block(nir_block *block, void *state)
-{
-   nir_foreach_instr(block, instr)
-      nir_foreach_ssa_def(instr, postvalidate_ssa_def, state);
-
-   return true;
-}
-
 static void
 validate_function_impl(nir_function_impl *impl, validate_state *state)
 {
@@ -1025,7 +1016,10 @@ validate_function_impl(nir_function_impl *impl, validate_state *state)
       postvalidate_reg_decl(reg, state);
    }
 
-   nir_foreach_block_call(impl, postvalidate_ssa_defs_block, state);
+   nir_foreach_block(block, impl) {
+      nir_foreach_instr(block, instr)
+         nir_foreach_ssa_def(instr, postvalidate_ssa_def, state);
+   }
 }
 
 static void