summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_from_ssa.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-04-26 20:16:21 -0700
committerJason Ekstrand <[email protected]>2016-04-28 15:54:48 -0700
commit8564916d01b31ca5665a27366e483738541ba5a3 (patch)
tree5b0563e838824f90ed398c0bf64ab3e3339fe7ce /src/compiler/nir/nir_from_ssa.c
parent707e72f13bb78869ee95d3286980bf1709cba6cf (diff)
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 <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_from_ssa.c')
-rw-r--r--src/compiler/nir/nir_from_ssa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_from_ssa.c b/src/compiler/nir/nir_from_ssa.c
index 947ebe1ccb7..d333752b371 100644
--- a/src/compiler/nir/nir_from_ssa.c
+++ b/src/compiler/nir/nir_from_ssa.c
@@ -331,7 +331,7 @@ isolate_phi_nodes_block(nir_block *block, void *dead_ctx)
nir_phi_instr *phi = nir_instr_as_phi(instr);
assert(phi->dest.is_ssa);
- nir_foreach_phi_src(phi, src) {
+ nir_foreach_phi_src(src, phi) {
nir_parallel_copy_instr *pcopy =
get_parallel_copy_at_end_of_block(src->pred);
assert(pcopy);
@@ -380,7 +380,7 @@ coalesce_phi_nodes_block(nir_block *block, struct from_ssa_state *state)
assert(phi->dest.is_ssa);
merge_node *dest_node = get_merge_node(&phi->dest.ssa, state);
- nir_foreach_phi_src(phi, src) {
+ nir_foreach_phi_src(src, phi) {
assert(src->src.is_ssa);
merge_node *src_node = get_merge_node(src->src.ssa, state);
if (src_node->set != dest_node->set)