[Mesa-dev] [PATCH 15/47] nir/lower_phis_to_scalar: fixup for new foreach_block()
Connor Abbott
cwabbott0 at gmail.com
Wed Apr 13 04:34:54 UTC 2016
Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
src/compiler/nir/nir_lower_phis_to_scalar.c | 9 +++++----
1 file 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 026c866..38f3dda 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(impl, lower_phis_to_scalar_block, &state);
+ nir_foreach_block(impl, block) {
+ lower_phis_to_scalar_block(block, &state);
+ }
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance);
--
2.5.0
More information about the mesa-dev
mailing list