summaryrefslogtreecommitdiff
path: root/gcc/sched-ebb.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-17 02:31:56 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-17 02:31:56 +0000
commitb3d6de8978fd2208885e98b19a91c9d29c170af5 (patch)
tree94c8895c6dde3b282518d4c9951067cd0ac517fd /gcc/sched-ebb.c
parent5e7d465f337d9d419b2528ad819390067caeca95 (diff)
downloadgcc-b3d6de8978fd2208885e98b19a91c9d29c170af5.tar.gz
Revert "Basic block renumbering removal", and two followup patches.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53537 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-ebb.c')
-rw-r--r--gcc/sched-ebb.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c
index 67f88844378..5f1464b9c14 100644
--- a/gcc/sched-ebb.c
+++ b/gcc/sched-ebb.c
@@ -279,11 +279,11 @@ void
schedule_ebbs (dump_file)
FILE *dump_file;
{
- basic_block bb;
+ int i;
/* Taking care of this degenerate case makes the rest of
this code simpler. */
- if (num_basic_blocks == 0)
+ if (n_basic_blocks == 0)
return;
scope_to_insns_initialize ();
@@ -296,19 +296,20 @@ schedule_ebbs (dump_file)
compute_bb_for_insn (get_max_uid ());
/* Schedule every region in the subroutine. */
- FOR_ALL_BB (bb)
- {
- rtx head = bb->head;
+ for (i = 0; i < n_basic_blocks; i++)
+ {
+ rtx head = BASIC_BLOCK (i)->head;
rtx tail;
for (;;)
{
+ basic_block b = BASIC_BLOCK (i);
edge e;
- tail = bb->end;
- if (bb->next_bb == EXIT_BLOCK_PTR
- || GET_CODE (bb->next_bb->head) == CODE_LABEL)
+ tail = b->end;
+ if (i + 1 == n_basic_blocks
+ || GET_CODE (BLOCK_HEAD (i + 1)) == CODE_LABEL)
break;
- for (e = bb->succ; e; e = e->succ_next)
+ for (e = b->succ; e; e = e->succ_next)
if ((e->flags & EDGE_FALLTHRU) != 0)
break;
if (! e)
@@ -324,7 +325,7 @@ schedule_ebbs (dump_file)
}
}
- bb = bb->next_bb;
+ i++;
}
/* Blah. We should fix the rest of the code not to get confused by