summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_global_to_local.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-04-26 20:30:10 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-04-28 15:54:48 -0700
commit5015260a0598ada4865b2c6086fc669505f64749 (patch)
tree5525c401e8a64983d4db83fd08d61209aae24700 /src/compiler/nir/nir_opt_global_to_local.c
parent9464d8c49813aba77285e7465b96e92a91ed327c (diff)
downloadexternal_mesa3d-5015260a0598ada4865b2c6086fc669505f64749.zip
external_mesa3d-5015260a0598ada4865b2c6086fc669505f64749.tar.gz
external_mesa3d-5015260a0598ada4865b2c6086fc669505f64749.tar.bz2
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 <ian.d.romanick@intel.com>
Diffstat (limited to 'src/compiler/nir/nir_opt_global_to_local.c')
-rw-r--r--src/compiler/nir/nir_opt_global_to_local.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_opt_global_to_local.c b/src/compiler/nir/nir_opt_global_to_local.c
index bccb45b..3555c7b 100644
--- a/src/compiler/nir/nir_opt_global_to_local.c
+++ b/src/compiler/nir/nir_opt_global_to_local.c
@@ -46,7 +46,7 @@ global_to_local(nir_register *reg)
}
}
- nir_foreach_use(reg, use_src) {
+ nir_foreach_use(use_src, reg) {
nir_instr *instr = use_src->parent_instr;
nir_function_impl *instr_impl =
nir_cf_node_get_function(&instr->block->cf_node);
@@ -58,7 +58,7 @@ global_to_local(nir_register *reg)
}
}
- nir_foreach_if_use(reg, use_src) {
+ nir_foreach_if_use(use_src, reg) {
nir_if *if_stmt = use_src->parent_if;
nir_function_impl *if_impl = nir_cf_node_get_function(&if_stmt->cf_node);
if (impl != NULL) {