diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2016-04-08 16:12:30 -0400 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-04-28 15:52:17 -0700 |
commit | 76c74de456534cc37f7a2610aff4452d3a034c46 (patch) | |
tree | 4e20bc7adca8abf94ed860e12d64f2001b751e78 /src/compiler/nir/nir_lower_phis_to_scalar.c | |
parent | b89f0bb58c4eec72918656460bb6e14b0b178590 (diff) | |
download | external_mesa3d-76c74de456534cc37f7a2610aff4452d3a034c46.zip external_mesa3d-76c74de456534cc37f7a2610aff4452d3a034c46.tar.gz external_mesa3d-76c74de456534cc37f7a2610aff4452d3a034c46.tar.bz2 |
nir/lower_phis_to_scalar: fixup for new foreach_block()
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/compiler/nir/nir_lower_phis_to_scalar.c')
-rw-r--r-- | src/compiler/nir/nir_lower_phis_to_scalar.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_phis_to_scalar.c b/src/compiler/nir/nir_lower_phis_to_scalar.c index 78fbcad..f6c0d1c 100644 --- a/src/compiler/nir/nir_lower_phis_to_scalar.c +++ b/src/compiler/nir/nir_lower_phis_to_scalar.c @@ -163,10 +163,9 @@ should_lower_phi(nir_phi_instr *phi, struct lower_phis_to_scalar_state *state) } static bool -lower_phis_to_scalar_block(nir_block *block, void *void_state) +lower_phis_to_scalar_block(nir_block *block, + struct lower_phis_to_scalar_state *state) { - struct lower_phis_to_scalar_state *state = void_state; - /* Find the last phi node in the block */ nir_phi_instr *last_phi = NULL; nir_foreach_instr(block, instr) { @@ -272,7 +271,9 @@ lower_phis_to_scalar_impl(nir_function_impl *impl) state.phi_table = _mesa_hash_table_create(state.dead_ctx, _mesa_hash_pointer, _mesa_key_pointer_equal); - nir_foreach_block_call(impl, lower_phis_to_scalar_block, &state); + nir_foreach_block(block, impl) { + lower_phis_to_scalar_block(block, &state); + } nir_metadata_preserve(impl, nir_metadata_block_index | nir_metadata_dominance); |