mirror of git://gcc.gnu.org/git/gcc.git
sparseset.h (sparseset_bit_p): Use gcc_checking_assert.
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. From-SVN: r195577
This commit is contained in:
parent
01cb1ef501
commit
11452e7bb9
|
|
@ -1,3 +1,10 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2013-01-30 Marek Polacek <polacek@redhat.com>
|
2013-01-30 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
* cfgcleanup.c (cleanup_cfg): Don't mark affected BBs.
|
* cfgcleanup.c (cleanup_cfg): Don't mark affected BBs.
|
||||||
|
|
|
||||||
|
|
@ -1141,7 +1141,8 @@ compute_idf (bitmap def_blocks, bitmap_head *dfs)
|
||||||
vec<int> work_stack;
|
vec<int> work_stack;
|
||||||
bitmap phi_insertion_points;
|
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);
|
phi_insertion_points = BITMAP_ALLOC (NULL);
|
||||||
|
|
||||||
/* Seed the work list with all the blocks in DEF_BLOCKS. We use
|
/* 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
|
form, the basic blocks where new and/or old names are defined
|
||||||
may have disappeared by CFG cleanup calls. In this case,
|
may have disappeared by CFG cleanup calls. In this case,
|
||||||
we may pull a non-existing block from the work stack. */
|
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,
|
EXECUTE_IF_AND_COMPL_IN_BITMAP (&dfs[bb_index], phi_insertion_points,
|
||||||
0, i, bi)
|
0, i, bi)
|
||||||
{
|
{
|
||||||
/* Use a safe push because if there is a definition of VAR
|
work_stack.quick_push (i);
|
||||||
in every basic block, then WORK_STACK may eventually have
|
|
||||||
more than N_BASIC_BLOCK entries. */
|
|
||||||
work_stack.safe_push (i);
|
|
||||||
bitmap_set_bit (phi_insertion_points, i);
|
bitmap_set_bit (phi_insertion_points, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ sparseset_bit_p (sparseset s, SPARSESET_ELT_TYPE e)
|
||||||
{
|
{
|
||||||
SPARSESET_ELT_TYPE idx;
|
SPARSESET_ELT_TYPE idx;
|
||||||
|
|
||||||
gcc_assert (e < s->size);
|
gcc_checking_assert (e < s->size);
|
||||||
|
|
||||||
idx = s->sparse[e];
|
idx = s->sparse[e];
|
||||||
|
|
||||||
|
|
@ -174,7 +174,7 @@ sparseset_pop (sparseset s)
|
||||||
{
|
{
|
||||||
SPARSESET_ELT_TYPE mem = s->members;
|
SPARSESET_ELT_TYPE mem = s->members;
|
||||||
|
|
||||||
gcc_assert (mem != 0);
|
gcc_checking_assert (mem != 0);
|
||||||
|
|
||||||
s->members = mem - 1;
|
s->members = mem - 1;
|
||||||
return s->dense[mem];
|
return s->dense[mem];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue