From: Connor Abbott Date: Tue, 12 Apr 2016 19:10:03 +0000 (-0400) Subject: nir/split_var_copies: fixup for new foreach_block() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3aaae398ea97ecdfaed8a5640948572a8834c29;p=mesa.git nir/split_var_copies: fixup for new foreach_block() Reviewed-by: Jason Ekstrand --- diff --git a/src/compiler/nir/nir_split_var_copies.c b/src/compiler/nir/nir_split_var_copies.c index 54024aae02c..da82e7cf6a2 100644 --- a/src/compiler/nir/nir_split_var_copies.c +++ b/src/compiler/nir/nir_split_var_copies.c @@ -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);