summaryrefslogtreecommitdiff
path: root/gcc/bt-load.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-04 18:31:39 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-04 18:31:39 +0000
commit87490e081a4dfc06033fe7ec1fc9217f5be12ac8 (patch)
tree6adda91d66fe398c1ac9ee82618b9a70f78c30fb /gcc/bt-load.c
parent686e094c0cb1a75f6da686d4b3bbd33044537566 (diff)
downloadgcc-87490e081a4dfc06033fe7ec1fc9217f5be12ac8.tar.gz
* tree-ssa-uncprop.c (associate_equivalences_with_edges): Use
last_basic_block for size of bb->index indexed array. * bt-load.c (compute_defs_uses_and_gen, compute_kill, compute_out, link_btr_uses, build_btr_def_use_webs, build_btr_def_use_webs, migrate_btr_defs): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145546 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bt-load.c')
-rw-r--r--gcc/bt-load.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index f052f6c9507..accba8d0d22 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -457,8 +457,8 @@ compute_defs_uses_and_gen (fibheap_t all_btr_defs, btr_def *def_array,
btr_def_group all_btr_def_groups = NULL;
defs_uses_info info;
- sbitmap_vector_zero (bb_gen, n_basic_blocks);
- for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++)
+ sbitmap_vector_zero (bb_gen, last_basic_block);
+ for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++)
{
basic_block bb = BASIC_BLOCK (i);
int reg;
@@ -618,8 +618,8 @@ compute_kill (sbitmap *bb_kill, sbitmap *btr_defset,
/* For each basic block, form the set BB_KILL - the set
of definitions that the block kills. */
- sbitmap_vector_zero (bb_kill, n_basic_blocks);
- for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++)
+ sbitmap_vector_zero (bb_kill, last_basic_block);
+ for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++)
{
for (regno = first_btr; regno <= last_btr; regno++)
if (TEST_HARD_REG_BIT (all_btrs, regno)
@@ -642,14 +642,14 @@ compute_out (sbitmap *bb_out, sbitmap *bb_gen, sbitmap *bb_kill, int max_uid)
int changed;
sbitmap bb_in = sbitmap_alloc (max_uid);
- for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++)
+ for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++)
sbitmap_copy (bb_out[i], bb_gen[i]);
changed = 1;
while (changed)
{
changed = 0;
- for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++)
+ for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++)
{
sbitmap_union_of_preds (bb_in, bb_out, i);
changed |= sbitmap_union_of_diff_cg (bb_out[i], bb_gen[i],
@@ -668,7 +668,7 @@ link_btr_uses (btr_def *def_array, btr_user *use_array, sbitmap *bb_out,
/* Link uses to the uses lists of all of their reaching defs.
Count up the number of reaching defs of each use. */
- for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++)
+ for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++)
{
basic_block bb = BASIC_BLOCK (i);
rtx insn;
@@ -780,8 +780,8 @@ build_btr_def_use_webs (fibheap_t all_btr_defs)
btr_user *use_array = XCNEWVEC (btr_user, max_uid);
sbitmap *btr_defset = sbitmap_vector_alloc (
(last_btr - first_btr) + 1, max_uid);
- sbitmap *bb_gen = sbitmap_vector_alloc (n_basic_blocks, max_uid);
- HARD_REG_SET *btrs_written = XCNEWVEC (HARD_REG_SET, n_basic_blocks);
+ sbitmap *bb_gen = sbitmap_vector_alloc (last_basic_block, max_uid);
+ HARD_REG_SET *btrs_written = XCNEWVEC (HARD_REG_SET, last_basic_block);
sbitmap *bb_kill;
sbitmap *bb_out;
@@ -790,11 +790,11 @@ build_btr_def_use_webs (fibheap_t all_btr_defs)
compute_defs_uses_and_gen (all_btr_defs, def_array, use_array, btr_defset,
bb_gen, btrs_written);
- bb_kill = sbitmap_vector_alloc (n_basic_blocks, max_uid);
+ bb_kill = sbitmap_vector_alloc (last_basic_block, max_uid);
compute_kill (bb_kill, btr_defset, btrs_written);
free (btrs_written);
- bb_out = sbitmap_vector_alloc (n_basic_blocks, max_uid);
+ bb_out = sbitmap_vector_alloc (last_basic_block, max_uid);
compute_out (bb_out, bb_gen, bb_kill, max_uid);
sbitmap_vector_free (bb_gen);
@@ -1403,7 +1403,7 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
{
int i;
- for (i = NUM_FIXED_BLOCKS; i < n_basic_blocks; i++)
+ for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++)
{
basic_block bb = BASIC_BLOCK (i);
fprintf(dump_file,
@@ -1426,8 +1426,8 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
first_btr = reg;
}
- btrs_live = XCNEWVEC (HARD_REG_SET, n_basic_blocks);
- btrs_live_at_end = XCNEWVEC (HARD_REG_SET, n_basic_blocks);
+ btrs_live = XCNEWVEC (HARD_REG_SET, last_basic_block);
+ btrs_live_at_end = XCNEWVEC (HARD_REG_SET, last_basic_block);
build_btr_def_use_webs (all_btr_defs);