diff options
author | Richard Guenther <rguenther@suse.de> | 2008-08-20 08:28:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-08-20 08:28:17 +0000 |
commit | c4ab2baad2c3e42f8afdeccd96b4bccdefbcb19e (patch) | |
tree | 5cee07e65003f9de125569866be3eeaa6a05ea79 /gcc/tree-ssa-pre.c | |
parent | 6c7c31a6a2d638d431c5fa5556896c75c4c80534 (diff) | |
download | gcc-c4ab2baad2c3e42f8afdeccd96b4bccdefbcb19e.zip gcc-c4ab2baad2c3e42f8afdeccd96b4bccdefbcb19e.tar.gz gcc-c4ab2baad2c3e42f8afdeccd96b4bccdefbcb19e.tar.bz2 |
tree-vrp.c (found_in_subgraph): Remove.
2008-08-20 Richard Guenther <rguenther@suse.de>
* tree-vrp.c (found_in_subgraph): Remove.
(live): New global static.
(live_on_edge): New function.
(blocks_visited): Remove.
(register_edge_assert_for_2): Use live_on_edge.
(find_conditional_asserts): Remove code dealing with
found_in_subgraph. Do not walk the CFG.
(find_switch_asserts): Likewise.
(find_assert_locations_1): Renamed from find_assert_locations.
Move finding assert locations for conditional and switch
statements first. Update live bitmap. Do not walk the CFG.
(find_assert_locations): New function.
(insert_range_assertions): Remove entry of CFG walk.
Adjust call to find_assert_locations.
* tree-ssa-pre.c (do_regular_insertion): Ignore critical edges
that only can appear because of fake exit edges but assert we
never try to insert on those.
(fini_pre): Do not remove fake exit edges here...
(execute_pre): ...but here, before committing edge inserts.
* gcc.dg/tree-ssa/pr20701.c: Scan vrp1 dump.
* gcc.dg/tree-ssa/ssa-dom-thread-1.c: Pass -fno-tree-vrp.
* gcc.dg/tree-ssa/ssa-pre-20.c: New testcase.
From-SVN: r139263
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index cc56782..d2a55ae 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -3160,14 +3160,9 @@ do_regular_insertion (basic_block block, basic_block dom) { unsigned int vprime; - /* This can happen in the very weird case - that our fake infinite loop edges have caused a - critical edge to appear. */ - if (EDGE_CRITICAL_P (pred)) - { - cant_insert = true; - break; - } + /* We should never run insertion for the exit block + and so not come across fake pred edges. */ + gcc_assert (!(pred->flags & EDGE_FAKE)); bprime = pred->src; eprime = phi_translate (expr, ANTIC_IN (block), NULL, bprime, block); @@ -3299,14 +3294,9 @@ do_partial_partial_insertion (basic_block block, basic_block dom) unsigned int vprime; pre_expr edoubleprime; - /* This can happen in the very weird case - that our fake infinite loop edges have caused a - critical edge to appear. */ - if (EDGE_CRITICAL_P (pred)) - { - cant_insert = true; - break; - } + /* We should never run insertion for the exit block + and so not come across fake pred edges. */ + gcc_assert (!(pred->flags & EDGE_FAKE)); bprime = pred->src; eprime = phi_translate (expr, ANTIC_IN (block), PA_IN (block), @@ -4117,7 +4107,6 @@ fini_pre (bool do_fre) free_alloc_pool (pre_expr_pool); htab_delete (phi_translate_table); htab_delete (expression_to_id); - remove_fake_exit_edges (); FOR_ALL_BB (bb) { @@ -4203,6 +4192,11 @@ execute_pre (bool do_fre ATTRIBUTE_UNUSED) statistics_counter_event (cfun, "New PHIs", pre_stats.phis); statistics_counter_event (cfun, "Eliminated", pre_stats.eliminations); statistics_counter_event (cfun, "Constified", pre_stats.constified); + + /* Make sure to remove fake edges before committing our inserts. + This makes sure we don't end up with extra critical edges that + we would need to split. */ + remove_fake_exit_edges (); gsi_commit_edge_inserts (); clear_expression_ids (); |