summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_dce.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-07-03 19:18:28 -0700
committerJason Ekstrand <[email protected]>2018-07-16 11:02:10 -0700
commitf378fa94b2e13d76fbc16e1cbc03d80dd9053d64 (patch)
tree1c89fed4a6eec82c6a99d3c74f4bcf893b0043bd /src/compiler/nir/nir_opt_dce.c
parent360714bfa56c0d7539cb3a8372beffdf7bdbaf10 (diff)
nir/worklist: Rework the foreach macro
This makes the arguments match the (thing, container) pattern used in other nir_foreach macros and also renames it to make that a bit more clear. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_dce.c')
-rw-r--r--src/compiler/nir/nir_opt_dce.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_opt_dce.c b/src/compiler/nir/nir_opt_dce.c
index c9b338862e6..70532be33d7 100644
--- a/src/compiler/nir/nir_opt_dce.c
+++ b/src/compiler/nir/nir_opt_dce.c
@@ -129,8 +129,7 @@ nir_opt_dce_impl(nir_function_impl *impl)
init_block(block, worklist);
}
- nir_instr *instr = NULL;
- nir_instr_worklist_foreach(worklist, instr)
+ nir_foreach_instr_in_worklist(instr, worklist)
nir_foreach_src(instr, mark_live_cb, worklist);
nir_instr_worklist_destroy(worklist);