diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-17 22:02:28 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-17 22:02:28 +0000 |
commit | d3129ae76f1d23b055609ef4791b08414db97491 (patch) | |
tree | 9482053a02baa634992e1645e25ff362d2445b74 /gcc/sched-rgn.c | |
parent | 1036fb4853d0bd204e7bbb9ba3709dc7cfa6ae1c (diff) | |
download | gcc-d3129ae76f1d23b055609ef4791b08414db97491.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93779 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r-- | gcc/sched-rgn.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 2aba7f3b1c1..3fae7904fc0 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. */ |