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>
This commit is contained in:
Jason Ekstrand
2016-04-26 20:16:21 -07:00
parent 707e72f13b
commit 8564916d01
15 changed files with 23 additions and 23 deletions

View File

@@ -261,7 +261,7 @@ rewrite_phi_preds(nir_block *block, nir_block *old_pred, nir_block *new_pred)
break;
nir_phi_instr *phi = nir_instr_as_phi(instr);
nir_foreach_phi_src(phi, src) {
nir_foreach_phi_src(src, phi) {
if (src->pred == old_pred) {
src->pred = new_pred;
break;
@@ -542,7 +542,7 @@ remove_phi_src(nir_block *block, nir_block *pred)
break;
nir_phi_instr *phi = nir_instr_as_phi(instr);
nir_foreach_phi_src_safe(phi, src) {
nir_foreach_phi_src_safe(src, phi) {
if (src->pred == pred) {
list_del(&src->src.use_link);
exec_node_remove(&src->node);