i965/vec4: split VEC4_OPCODE_FROM_DOUBLE into one opcode per destination's type
[mesa.git] / src / compiler / nir / nir_liveness.c
index 67913ca86c03e3276227b971f49e3b9171338074..1fcb01d5ef63abb6c03c6ee7916f7a8cba6cf683 100644 (file)
@@ -124,7 +124,7 @@ propagate_across_edge(nir_block *pred, nir_block *succ,
    NIR_VLA(BITSET_WORD, live, state->bitset_words);
    memcpy(live, succ->live_in, state->bitset_words * sizeof *live);
 
-   nir_foreach_instr(succ, instr) {
+   nir_foreach_instr(instr, succ) {
       if (instr->type != nir_instr_type_phi)
          break;
       nir_phi_instr *phi = nir_instr_as_phi(instr);
@@ -133,12 +133,12 @@ propagate_across_edge(nir_block *pred, nir_block *succ,
       set_ssa_def_dead(&phi->dest.ssa, live);
    }
 
-   nir_foreach_instr(succ, instr) {
+   nir_foreach_instr(instr, succ) {
       if (instr->type != nir_instr_type_phi)
          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 == pred) {
             set_src_live(&src->src, live);
             break;
@@ -165,7 +165,7 @@ nir_live_ssa_defs_impl(nir_function_impl *impl)
     */
    state.num_ssa_defs = 1;
    nir_foreach_block(block, impl) {
-      nir_foreach_instr(block, instr)
+      nir_foreach_instr(instr, block)
          nir_foreach_ssa_def(instr, index_ssa_def, &state);
    }
 
@@ -201,7 +201,7 @@ nir_live_ssa_defs_impl(nir_function_impl *impl)
       if (following_if)
          set_src_live(&following_if->condition, block->live_in);
 
-      nir_foreach_instr_reverse(block, instr) {
+      nir_foreach_instr_reverse(instr, block) {
          /* Phi nodes are handled seperately so we want to skip them.  Since
           * we are going backwards and they are at the beginning, we can just
           * break as soon as we see one.