summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_phis_to_scalar.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-04-26 20:16:21 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-04-28 15:54:48 -0700
commit8564916d01b31ca5665a27366e483738541ba5a3 (patch)
tree5b0563e838824f90ed398c0bf64ab3e3339fe7ce /src/compiler/nir/nir_lower_phis_to_scalar.c
parent707e72f13bb78869ee95d3286980bf1709cba6cf (diff)
downloadexternal_mesa3d-8564916d01b31ca5665a27366e483738541ba5a3.zip
external_mesa3d-8564916d01b31ca5665a27366e483738541ba5a3.tar.gz
external_mesa3d-8564916d01b31ca5665a27366e483738541ba5a3.tar.bz2
nir: Switch the arguments to nir_foreach_phi_src
This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_phi_src(\([^,]*\),\s*\([^,]*\))/nir_foreach_phi_src(\2, \1)/ and a similar expression for nir_foreach_phi_src_safe. Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Diffstat (limited to 'src/compiler/nir/nir_lower_phis_to_scalar.c')
-rw-r--r--src/compiler/nir/nir_lower_phis_to_scalar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_phis_to_scalar.c b/src/compiler/nir/nir_lower_phis_to_scalar.c
index a1a679b..0e27e6d 100644
--- a/src/compiler/nir/nir_lower_phis_to_scalar.c
+++ b/src/compiler/nir/nir_lower_phis_to_scalar.c
@@ -146,7 +146,7 @@ should_lower_phi(nir_phi_instr *phi, struct lower_phis_to_scalar_state *state)
bool scalarizable = true;
- nir_foreach_phi_src(phi, src) {
+ nir_foreach_phi_src(src, phi) {
scalarizable = is_phi_src_scalarizable(src, state);
if (!scalarizable)
break;
@@ -214,7 +214,7 @@ lower_phis_to_scalar_block(nir_block *block,
vec->src[i].src = nir_src_for_ssa(&new_phi->dest.ssa);
- nir_foreach_phi_src(phi, src) {
+ nir_foreach_phi_src(src, phi) {
/* We need to insert a mov to grab the i'th component of src */
nir_alu_instr *mov = nir_alu_instr_create(state->mem_ctx,
nir_op_imov);