summaryrefslogtreecommitdiff
path: root/gcc/cfganal.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-30 15:42:49 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-30 15:42:49 +0000
commit545cf51cad15cd5e96c7b30e34612ac546ca8626 (patch)
tree2699dd96877fb3ea03cd20f59419eddedf1d0232 /gcc/cfganal.c
parent022d4ccc2b0052a7ec0266f8e63c94055a82fd8b (diff)
downloadgcc-545cf51cad15cd5e96c7b30e34612ac546ca8626.tar.gz
2013-01-30 Richard Biener <rguenther@suse.de>
* sparseset.h (sparseset_bit_p): Use gcc_checking_assert. (sparseset_pop): Likewise. * cfganal.c (compute_idf): Likewise. Increase work-stack size to be able to use quick_push in the worker loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195577 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfganal.c')
-rw-r--r--gcc/cfganal.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/cfganal.c b/gcc/cfganal.c
index 25f2507b95c..63d17cede2b 100644
--- a/gcc/cfganal.c
+++ b/gcc/cfganal.c
@@ -1141,7 +1141,8 @@ compute_idf (bitmap def_blocks, bitmap_head *dfs)
vec<int> work_stack;
bitmap phi_insertion_points;
- work_stack.create (n_basic_blocks);
+ /* Each block can appear at most twice on the work-stack. */
+ work_stack.create (2 * n_basic_blocks);
phi_insertion_points = BITMAP_ALLOC (NULL);
/* Seed the work list with all the blocks in DEF_BLOCKS. We use
@@ -1165,15 +1166,12 @@ compute_idf (bitmap def_blocks, bitmap_head *dfs)
form, the basic blocks where new and/or old names are defined
may have disappeared by CFG cleanup calls. In this case,
we may pull a non-existing block from the work stack. */
- gcc_assert (bb_index < (unsigned) last_basic_block);
+ gcc_checking_assert (bb_index < (unsigned) last_basic_block);
EXECUTE_IF_AND_COMPL_IN_BITMAP (&dfs[bb_index], phi_insertion_points,
0, i, bi)
{
- /* Use a safe push because if there is a definition of VAR
- in every basic block, then WORK_STACK may eventually have
- more than N_BASIC_BLOCK entries. */
- work_stack.safe_push (i);
+ work_stack.quick_push (i);
bitmap_set_bit (phi_insertion_points, i);
}
}