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/regrename.c | |
| parent | 1036fb4853d0bd204e7bbb9ba3709dc7cfa6ae1c (diff) | |
| download | ppe42-gcc-d3129ae76f1d23b055609ef4791b08414db97491.tar.gz ppe42-gcc-d3129ae76f1d23b055609ef4791b08414db97491.zip | |
* 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/regrename.c')
| -rw-r--r-- | gcc/regrename.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c index eec594c7647..f2ab1f10338 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -1746,29 +1746,26 @@ copyprop_hardreg_forward (void) struct value_data *all_vd; bool need_refresh; basic_block bb; + sbitmap visited; need_refresh = false; all_vd = xmalloc (sizeof (struct value_data) * last_basic_block); - /* Clear all BB_VISITED flags. We use BB_VISITED flags to indicate - whether we have processed a given basic block or not. Note that - we never put BB_VISITED flag on ENTRY_BLOCK_PTR throughout this - function because we want to call init_value_data for all - successors of ENTRY_BLOCK_PTR. */ - FOR_ALL_BB (bb) - bb->flags &= ~BB_VISITED; + visited = sbitmap_alloc (last_basic_block - (INVALID_BLOCK + 1)); + sbitmap_zero (visited); FOR_EACH_BB (bb) { - bb->flags |= BB_VISITED; + SET_BIT (visited, bb->index - (INVALID_BLOCK + 1)); /* If a block has a single predecessor, that we've already processed, begin with the value data that was live at the end of the predecessor block. */ /* ??? Ought to use more intelligent queuing of blocks. */ if (EDGE_COUNT (bb->preds) == 1 - && ((EDGE_PRED (bb, 0)->src->flags & BB_VISITED) != 0) + && TEST_BIT (visited, + EDGE_PRED (bb, 0)->src->index - (INVALID_BLOCK + 1)) && ! (EDGE_PRED (bb, 0)->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))) all_vd[bb->index] = all_vd[EDGE_PRED (bb, 0)->src->index]; else @@ -1778,11 +1775,7 @@ copyprop_hardreg_forward (void) need_refresh = true; } - /* Clear BB_VISITED flag on each basic block. We do not need to - clear the one on ENTRY_BLOCK_PTR because it's already cleared - above. */ - FOR_EACH_BB (bb) - bb->flags &= ~BB_VISITED; + sbitmap_free (visited); if (need_refresh) { |

