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

index 54024aae02c24a70c5ba344a40249542c551c280..da82e7cf6a203f7e3fff1e655d5dc50d37c390ec 100644 (file)
@@ -206,10 +206,8 @@ split_var_copy_instr(nir_intrinsic_instr *old_copy,
 }
 
 static bool
-split_var_copies_block(nir_block *block, void *void_state)
+split_var_copies_block(nir_block *block, struct split_var_copies_state *state)
 {
-   struct split_var_copies_state *state = void_state;
-
    nir_foreach_instr_safe(block, instr) {
       if (instr->type != nir_instr_type_intrinsic)
          continue;
@@ -261,7 +259,9 @@ split_var_copies_impl(nir_function_impl *impl)
    state.dead_ctx = ralloc_context(NULL);
    state.progress = false;
 
-   nir_foreach_block_call(impl, split_var_copies_block, &state);
+   nir_foreach_block(block, impl) {
+      split_var_copies_block(block, &state);
+   }
 
    ralloc_free(state.dead_ctx);