summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2016-04-08 15:56:09 -0400
committerJason Ekstrand <[email protected]>2016-04-28 15:52:17 -0700
commit15264133d7f3b2c63839ae20f45243b62d9f8edd (patch)
tree8bcd714e340017fae843a8290291e93c02e8fe9d /src
parent1c6307aab4eab16c70edd9bc237b82ba596b66e0 (diff)
nir/lower_locals_to_regs: fixup for new foreach_block()
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_locals_to_regs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_locals_to_regs.c b/src/compiler/nir/nir_lower_locals_to_regs.c
index 0a4d9befd73..3465d54224d 100644
--- a/src/compiler/nir/nir_lower_locals_to_regs.c
+++ b/src/compiler/nir/nir_lower_locals_to_regs.c
@@ -201,10 +201,9 @@ get_deref_reg_src(nir_deref_var *deref, nir_instr *instr,
}
static bool
-lower_locals_to_regs_block(nir_block *block, void *void_state)
+lower_locals_to_regs_block(nir_block *block,
+ struct locals_to_regs_state *state)
{
- struct locals_to_regs_state *state = void_state;
-
nir_foreach_instr_safe(block, instr) {
if (instr->type != nir_instr_type_intrinsic)
continue;
@@ -358,7 +357,9 @@ nir_lower_locals_to_regs_impl(nir_function_impl *impl)
nir_metadata_require(impl, nir_metadata_dominance);
- nir_foreach_block_call(impl, lower_locals_to_regs_block, &state);
+ nir_foreach_block(block, impl) {
+ lower_locals_to_regs_block(block, &state);
+ }
nir_array_foreach(&state.derefs_array, nir_deref_var *, deref_ptr) {
nir_deref_var *deref = *deref_ptr;