diff options
Diffstat (limited to 'gcc/graph.c')
-rw-r--r-- | gcc/graph.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/graph.c b/gcc/graph.c index 3dd6f6f9f1f..87230479bb4 100644 --- a/gcc/graph.c +++ b/gcc/graph.c @@ -258,6 +258,7 @@ print_rtl_graph_with_bb (base, suffix, rtx_first) fprintf (fp, "(nil)\n"); else { + int i; enum bb_state { NOT_IN_BB, IN_ONE_BB, IN_MULTIPLE_BB }; int max_uid = get_max_uid (); int *start = (int *) xmalloc (max_uid * sizeof (int)); @@ -265,19 +266,19 @@ print_rtl_graph_with_bb (base, suffix, rtx_first) enum bb_state *in_bb_p = (enum bb_state *) xmalloc (max_uid * sizeof (enum bb_state)); basic_block bb; - int j; - for (j = 0; j < max_uid; ++j) + for (i = 0; i < max_uid; ++i) { - start[j] = end[j] = -1; - in_bb_p[j] = NOT_IN_BB; + start[i] = end[i] = -1; + in_bb_p[i] = NOT_IN_BB; } - FOR_ALL_BB_REVERSE (bb) + for (i = n_basic_blocks - 1; i >= 0; --i) { rtx x; - start[INSN_UID (bb->head)] = bb->sindex; - end[INSN_UID (bb->end)] = bb->sindex; + bb = BASIC_BLOCK (i); + start[INSN_UID (bb->head)] = i; + end[INSN_UID (bb->end)] = i; for (x = bb->head; x != NULL_RTX; x = NEXT_INSN (x)) { in_bb_p[INSN_UID (x)] @@ -309,12 +310,12 @@ print_rtl_graph_with_bb (base, suffix, rtx_first) continue; } - if ((j = start[INSN_UID (tmp_rtx)]) >= 0) + if ((i = start[INSN_UID (tmp_rtx)]) >= 0) { /* We start a subgraph for each basic block. */ - start_bb (fp, j); + start_bb (fp, i); - if (j == 0) + if (i == 0) draw_edge (fp, 0, INSN_UID (tmp_rtx), 1, 0); } @@ -322,11 +323,11 @@ print_rtl_graph_with_bb (base, suffix, rtx_first) node_data (fp, tmp_rtx); next_insn = next_nonnote_insn (tmp_rtx); - if ((j = end[INSN_UID (tmp_rtx)]) >= 0) + if ((i = end[INSN_UID (tmp_rtx)]) >= 0) { edge e; - bb = BASIC_BLOCK (j); + bb = BASIC_BLOCK (i); /* End of the basic block. */ end_bb (fp); |