From b3aaae398ea97ecdfaed8a5640948572a8834c29 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 12 Apr 2016 15:10:03 -0400 Subject: nir/split_var_copies: fixup for new foreach_block() Reviewed-by: Jason Ekstrand --- src/compiler/nir/nir_split_var_copies.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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); -- cgit v1.2.3