summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_peephole_select.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_peephole_select.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_peephole_select.c')
-rw-r--r--src/compiler/nir/nir_opt_peephole_select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_peephole_select.c b/src/compiler/nir/nir_opt_peephole_select.c
index e06820d..7fcc71e 100644
--- a/src/compiler/nir/nir_opt_peephole_select.c
+++ b/src/compiler/nir/nir_opt_peephole_select.c
@@ -108,7 +108,7 @@ block_check_for_allowed_instrs(nir_block *block)
return false;
/* The only uses of this definition must be phi's in the successor */
- nir_foreach_use(&mov->dest.dest.ssa, use) {
+ nir_foreach_use(use, &mov->dest.dest.ssa) {
if (use->parent_instr->type != nir_instr_type_phi ||
use->parent_instr->block != block->successors[0])
return false;