diff options
author | Connor Abbott <[email protected]> | 2016-04-08 16:39:38 -0400 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-28 15:52:17 -0700 |
commit | ceed12557dcba4e0e60e06d03a717d5e21880e16 (patch) | |
tree | 9792ddf8553646f6476e3b6d0067ecbcbd40b845 /src/compiler/nir/nir_lower_vars_to_ssa.c | |
parent | 1557344c81c78802ec3325271eecce6cfae1540b (diff) |
nir/lower_vars_to_ssa: fixup for new foreach_block()
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_vars_to_ssa.c')
-rw-r--r-- | src/compiler/nir/nir_lower_vars_to_ssa.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c index 57d18401ca8..66e0edbc371 100644 --- a/src/compiler/nir/nir_lower_vars_to_ssa.c +++ b/src/compiler/nir/nir_lower_vars_to_ssa.c @@ -404,10 +404,9 @@ register_copy_instr(nir_intrinsic_instr *copy_instr, /* Registers all variable uses in the given block. */ static bool -register_variable_uses_block(nir_block *block, void *void_state) +register_variable_uses_block(nir_block *block, + struct lower_variables_state *state) { - struct lower_variables_state *state = void_state; - nir_foreach_instr_safe(block, instr) { if (instr->type != nir_instr_type_intrinsic) continue; @@ -653,7 +652,10 @@ nir_lower_vars_to_ssa_impl(nir_function_impl *impl) /* Build the initial deref structures and direct_deref_nodes table */ state.add_to_direct_deref_nodes = true; - nir_foreach_block_call(impl, register_variable_uses_block, &state); + + nir_foreach_block(block, impl) { + register_variable_uses_block(block, &state); + } bool progress = false; @@ -693,7 +695,9 @@ nir_lower_vars_to_ssa_impl(nir_function_impl *impl) * added load/store instructions are registered. We need this * information for phi node insertion below. */ - nir_foreach_block_call(impl, register_variable_uses_block, &state); + nir_foreach_block(block, impl) { + register_variable_uses_block(block, &state); + } state.phi_builder = nir_phi_builder_create(state.impl); |