#define NIR_DEST_INIT nir_dest_init()
-#define nir_foreach_def(reg, dest) \
+#define nir_foreach_def(dest, reg) \
list_for_each_entry(nir_dest, dest, &(reg)->defs, reg.def_link)
-#define nir_foreach_def_safe(reg, dest) \
+#define nir_foreach_def_safe(dest, reg) \
list_for_each_entry_safe(nir_dest, dest, &(reg)->defs, reg.def_link)
static inline nir_src
assert(reg->is_global);
- nir_foreach_def(reg, def_dest) {
+ nir_foreach_def(def_dest, reg) {
nir_instr *instr = def_dest->reg.parent_instr;
nir_function_impl *instr_impl =
nir_cf_node_get_function(&instr->block->cf_node);
w_start = w_end = 0;
iter_count++;
- nir_foreach_def(reg, dest) {
+ nir_foreach_def(dest, reg) {
nir_instr *def = dest->reg.parent_instr;
if (work[def->block->index] < iter_count)
W[w_end++] = def->block;
abort();
}
- nir_foreach_def(reg, src) {
+ nir_foreach_def(src, reg) {
struct set_entry *entry = _mesa_set_search(reg_state->defs, src);
assert(entry);
_mesa_set_remove(reg_state->defs, entry);