tree-ssa-uncprop.c (associate_equivalences_with_edges): Use last_basic_block for size of bb->index indexed array.
* 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. From-SVN: r145546
This commit is contained in:
parent
14925fcd47
commit
1ff7d06b77
@ -1,3 +1,11 @@
|
||||
2009-04-04 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* 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.
|
||||
|
||||
2009-04-04 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* except.c (remove_eh_handler_and_replace): Break out from ...
|
||||
|
@ -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);
|
||||
|
||||
|
@ -177,7 +177,7 @@ associate_equivalences_with_edges (void)
|
||||
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (cond))
|
||||
{
|
||||
int i, n_labels = gimple_switch_num_labels (stmt);
|
||||
tree *info = XCNEWVEC (tree, n_basic_blocks);
|
||||
tree *info = XCNEWVEC (tree, last_basic_block);
|
||||
|
||||
/* Walk over the case label vector. Record blocks
|
||||
which are reached by a single case label which represents
|
||||
|
Loading…
x
Reference in New Issue
Block a user