summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_repair_ssa.c
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2016-04-12 15:06:20 -0400
committerJason Ekstrand <[email protected]>2016-04-28 15:52:17 -0700
commit9d41a1ffebfb62ec3ab6e09ae926dcb04917eccd (patch)
tree9a0b40cbb744f67915ef2b93faa3068c67a23d61 /src/compiler/nir/nir_repair_ssa.c
parent480a182ccd50a084e260f154b4f288b6de1c2d2f (diff)
nir/repair_ssa: fixup for new foreach_block()
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_repair_ssa.c')
-rw-r--r--src/compiler/nir/nir_repair_ssa.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/compiler/nir/nir_repair_ssa.c b/src/compiler/nir/nir_repair_ssa.c
index 336f7d59a4e..ac0bce1fb4d 100644
--- a/src/compiler/nir/nir_repair_ssa.c
+++ b/src/compiler/nir/nir_repair_ssa.c
@@ -101,16 +101,6 @@ repair_ssa_def(nir_ssa_def *def, void *void_state)
return true;
}
-static bool
-repair_ssa_block(nir_block *block, void *state)
-{
- nir_foreach_instr_safe(block, instr) {
- nir_foreach_ssa_def(instr, repair_ssa_def, state);
- }
-
- return true;
-}
-
bool
nir_repair_ssa_impl(nir_function_impl *impl)
{
@@ -123,7 +113,11 @@ nir_repair_ssa_impl(nir_function_impl *impl)
nir_metadata_require(impl, nir_metadata_block_index |
nir_metadata_dominance);
- nir_foreach_block_call(impl, repair_ssa_block, &state);
+ nir_foreach_block(block, impl) {
+ nir_foreach_instr_safe(block, instr) {
+ nir_foreach_ssa_def(instr, repair_ssa_def, &state);
+ }
+ }
if (state.progress)
nir_metadata_preserve(impl, nir_metadata_block_index |