summaryrefslogtreecommitdiff
path: root/gcc/resource.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-05-16 19:31:56 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-05-16 19:31:56 -0700
commit0b17ab2f5b1184fdb568786f791bc0613e574241 (patch)
tree94c8895c6dde3b282518d4c9951067cd0ac517fd /gcc/resource.c
parent8ae86b3cd8c96e287714f127879b018ac7fccd7d (diff)
downloadgcc-0b17ab2f5b1184fdb568786f791bc0613e574241.tar.gz
Revert "Basic block renumbering removal", and two followup patches.
From-SVN: r53537
Diffstat (limited to 'gcc/resource.c')
-rw-r--r--gcc/resource.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/resource.c b/gcc/resource.c
index 04c6cb74430..6c20517a5f0 100644
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -133,7 +133,7 @@ find_basic_block (insn, search_limit)
rtx insn;
int search_limit;
{
- basic_block bb;
+ int i;
/* Scan backwards to the previous BARRIER. Then see if we can find a
label that starts a basic block. Return the basic block number. */
@@ -156,9 +156,9 @@ find_basic_block (insn, search_limit)
insn && GET_CODE (insn) == CODE_LABEL;
insn = next_nonnote_insn (insn))
{
- FOR_ALL_BB (bb)
- if (insn == bb->head)
- return bb->sindex;
+ for (i = 0; i < n_basic_blocks; i++)
+ if (insn == BLOCK_HEAD (i))
+ return i;
}
return -1;
@@ -1240,7 +1240,7 @@ init_resource_info (epilogue_insn)
/* Allocate and initialize the tables used by mark_target_live_regs. */
target_hash_table = (struct target_info **)
xcalloc (TARGET_HASH_PRIME, sizeof (struct target_info *));
- bb_ticks = (int *) xcalloc (last_basic_block, sizeof (int));
+ bb_ticks = (int *) xcalloc (n_basic_blocks, sizeof (int));
}
/* Free up the resources allcated to mark_target_live_regs (). This