summaryrefslogtreecommitdiff
path: root/gcc/ra-build.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ra-build.c')
-rw-r--r--gcc/ra-build.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ra-build.c b/gcc/ra-build.c
index 69f6aaa5872..b66e0972c7d 100644
--- a/gcc/ra-build.c
+++ b/gcc/ra-build.c
@@ -924,6 +924,7 @@ live_in (struct df *df, struct curr_use *use, rtx insn)
are allowed. */
while (1)
{
+ unsigned int i;
int uid = INSN_UID (insn);
basic_block bb = BLOCK_FOR_INSN (insn);
number_seen[uid]++;
@@ -940,7 +941,7 @@ live_in (struct df *df, struct curr_use *use, rtx insn)
edge e;
unsigned HOST_WIDE_INT undef = use->undefined;
struct ra_bb_info *info = (struct ra_bb_info *) bb->aux;
- if ((e = bb->pred) == NULL)
+ if (EDGE_COUNT (bb->preds) == 0)
return;
/* We now check, if we already traversed the predecessors of this
block for the current pass and the current set of undefined
@@ -952,8 +953,9 @@ live_in (struct df *df, struct curr_use *use, rtx insn)
info->pass = loc_vpass;
info->undefined = undef;
/* All but the last predecessor are handled recursively. */
- for (; e->pred_next; e = e->pred_next)
+ for (e = NULL, i = 0; i < EDGE_COUNT (bb->preds) - 1; i++)
{
+ e = EDGE_PRED (bb, i);
insn = live_in_edge (df, use, e);
if (insn)
live_in (df, use, insn);