From 5015260a0598ada4865b2c6086fc669505f64749 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 26 Apr 2016 20:30:10 -0700 Subject: 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 --- src/compiler/nir/nir_opt_peephole_select.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/nir/nir_opt_peephole_select.c') diff --git a/src/compiler/nir/nir_opt_peephole_select.c b/src/compiler/nir/nir_opt_peephole_select.c index e06820d3e17..7fcc71ea9d7 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; -- cgit v1.2.3