mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 14:50:10 +01:00
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 <caio.oliveira@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
360714bfa5
commit
f378fa94b2
2 changed files with 3 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -154,8 +154,8 @@ nir_instr_worklist_pop_head(nir_instr_worklist *wl)
|
|||
return *vec_instr;
|
||||
}
|
||||
|
||||
#define nir_instr_worklist_foreach(wl, instr) \
|
||||
while ((instr = nir_instr_worklist_pop_head(wl)))
|
||||
#define nir_foreach_instr_in_worklist(instr, wl) \
|
||||
for (nir_instr *instr; (instr = nir_instr_worklist_pop_head(wl));)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue