diff options
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r-- | gcc/cfgloop.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index f565708..4c9bbf0 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -563,11 +563,13 @@ find_subloop_latch_edge_by_profile (VEC (edge, heap) *latches) another edge. */ static edge -find_subloop_latch_edge_by_ivs (struct loop *loop, VEC (edge, heap) *latches) +find_subloop_latch_edge_by_ivs (struct loop *loop ATTRIBUTE_UNUSED, VEC (edge, heap) *latches) { edge e, latch = VEC_index (edge, latches, 0); unsigned i; - tree phi, lop; + gimple phi; + gimple_stmt_iterator psi; + tree lop; basic_block bb; /* Find the candidate for the latch edge. */ @@ -582,15 +584,16 @@ find_subloop_latch_edge_by_ivs (struct loop *loop, VEC (edge, heap) *latches) /* Check for a phi node that would deny that this is a latch edge of a subloop. */ - for (phi = phi_nodes (loop->header); phi; phi = PHI_CHAIN (phi)) + for (psi = gsi_start_phis (loop->header); !gsi_end_p (psi); gsi_next (&psi)) { + phi = gsi_stmt (psi); lop = PHI_ARG_DEF_FROM_EDGE (phi, latch); /* Ignore the values that are not changed inside the subloop. */ if (TREE_CODE (lop) != SSA_NAME || SSA_NAME_DEF_STMT (lop) == phi) continue; - bb = bb_for_stmt (SSA_NAME_DEF_STMT (lop)); + bb = gimple_bb (SSA_NAME_DEF_STMT (lop)); if (!bb || !flow_bb_inside_loop_p (loop, bb)) continue; |