summaryrefslogtreecommitdiff
path: root/gcc/resource.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/resource.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/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