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-Tag: upstream/17.1.0~10450 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3aaae398ea97ecdfaed8a5640948572a8834c29;p=platform%2Fupstream%2Fmesa.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 54024aa..da82e7c 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);