aboutsummaryrefslogtreecommitdiff
path: root/gcc/sched-rgn.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2005-01-17 22:02:28 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2005-01-17 22:02:28 +0000
commit740ce53d8ae86887612273a219a3aa6fa97040a9 (patch)
tree9482053a02baa634992e1645e25ff362d2445b74 /gcc/sched-rgn.c
parent2184a1201e63dbd4798c041370f7fcbb711813fb (diff)
downloadgcc-740ce53d8ae86887612273a219a3aa6fa97040a9.zip
gcc-740ce53d8ae86887612273a219a3aa6fa97040a9.tar.gz
gcc-740ce53d8ae86887612273a219a3aa6fa97040a9.tar.bz2
basic-block.h: Document BB_* flags.
* basic-block.h: Document BB_* flags. * regrename.c (copyprop_hardreg_forward): Don't use BB_VISITED, use an sbitmap instead. * sched-rgn.c (compute_trg_info): Likewise. From-SVN: r93779
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r--gcc/sched-rgn.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 2aba7f3..3fae790 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -997,6 +997,7 @@ compute_trg_info (int trg)
edgelst el;
int i, j, k, update_idx;
basic_block block;
+ sbitmap visited;
edge_iterator ei;
edge e;
@@ -1006,6 +1007,8 @@ compute_trg_info (int trg)
sp->is_speculative = 0;
sp->src_prob = 100;
+ visited = sbitmap_alloc (last_basic_block - (INVALID_BLOCK + 1));
+
for (i = trg + 1; i < current_nr_blocks; i++)
{
sp = candidate_table + i;
@@ -1043,12 +1046,14 @@ compute_trg_info (int trg)
overrunning the end of the bblst_table. */
update_idx = 0;
+ sbitmap_zero (visited);
for (j = 0; j < el.nr_members; j++)
{
block = el.first_member[j]->src;
FOR_EACH_EDGE (e, ei, block->succs)
{
- if (!(e->dest->flags & BB_VISITED))
+ if (!TEST_BIT (visited,
+ e->dest->index - (INVALID_BLOCK + 1)))
{
for (k = 0; k < el.nr_members; k++)
if (e == el.first_member[k])
@@ -1057,7 +1062,8 @@ compute_trg_info (int trg)
if (k >= el.nr_members)
{
bblst_table[bblst_last++] = e->dest;
- e->dest->flags |= BB_VISITED;
+ SET_BIT (visited,
+ e->dest->index - (INVALID_BLOCK + 1));
update_idx++;
}
}
@@ -1065,9 +1071,6 @@ compute_trg_info (int trg)
}
sp->update_bbs.nr_members = update_idx;
- FOR_ALL_BB (block)
- block->flags &= ~BB_VISITED;
-
/* Make sure we didn't overrun the end of bblst_table. */
gcc_assert (bblst_last <= bblst_size);
}
@@ -1079,6 +1082,8 @@ compute_trg_info (int trg)
sp->src_prob = 0;
}
}
+
+ sbitmap_free (visited);
}
/* Print candidates info, for debugging purposes. Callable from debugger. */