diff options
author | Jason Ekstrand <[email protected]> | 2016-04-26 20:30:10 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-28 15:54:48 -0700 |
commit | 5015260a0598ada4865b2c6086fc669505f64749 (patch) | |
tree | 5525c401e8a64983d4db83fd08d61209aae24700 /src/compiler/nir/nir_validate.c | |
parent | 9464d8c49813aba77285e7465b96e92a91ed327c (diff) |
nir: Switch the arguments to nir_foreach_use and friends
This matches the "foreach x in container" pattern found in many other
programming languages. Generated by the following regular expression:
s/nir_foreach_use(\([^,]*\),\s*\([^,]*\))/nir_foreach_use(\2, \1)/
and similar expressions for nir_foreach_use_safe, etc.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_validate.c')
-rw-r--r-- | src/compiler/nir/nir_validate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index e928c41607b..53cdbc4e324 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -852,7 +852,7 @@ postvalidate_reg_decl(nir_register *reg, validate_state *state) reg_validate_state *reg_state = (reg_validate_state *) entry->data; - nir_foreach_use(reg, src) { + nir_foreach_use(src, reg) { struct set_entry *entry = _mesa_set_search(reg_state->uses, src); assert(entry); _mesa_set_remove(reg_state->uses, entry); @@ -867,7 +867,7 @@ postvalidate_reg_decl(nir_register *reg, validate_state *state) abort(); } - nir_foreach_if_use(reg, src) { + nir_foreach_if_use(src, reg) { struct set_entry *entry = _mesa_set_search(reg_state->if_uses, src); assert(entry); _mesa_set_remove(reg_state->if_uses, entry); @@ -924,7 +924,7 @@ postvalidate_ssa_def(nir_ssa_def *def, void *void_state) struct hash_entry *entry = _mesa_hash_table_search(state->ssa_defs, def); ssa_def_validate_state *def_state = (ssa_def_validate_state *)entry->data; - nir_foreach_use(def, src) { + nir_foreach_use(src, def) { struct set_entry *entry = _mesa_set_search(def_state->uses, src); assert(entry); _mesa_set_remove(def_state->uses, entry); @@ -939,7 +939,7 @@ postvalidate_ssa_def(nir_ssa_def *def, void *void_state) abort(); } - nir_foreach_if_use(def, src) { + nir_foreach_if_use(src, def) { struct set_entry *entry = _mesa_set_search(def_state->if_uses, src); assert(entry); _mesa_set_remove(def_state->if_uses, entry); |