diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2007-05-17 10:10:24 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-05-17 08:10:24 +0000 |
commit | b02b9b53ec39cfd36e27424c4c07be5880ec393a (patch) | |
tree | 7157094906e2791038cab066565c2c9b9c4e3104 /gcc/tree-vrp.c | |
parent | d2594859a6d1ea12ddde863721acbcb7fa645371 (diff) | |
download | gcc-b02b9b53ec39cfd36e27424c4c07be5880ec393a.zip gcc-b02b9b53ec39cfd36e27424c4c07be5880ec393a.tar.gz gcc-b02b9b53ec39cfd36e27424c4c07be5880ec393a.tar.bz2 |
tree-vrp.c (finalize_jump_threads): Do not care about dominance info.
* tree-vrp.c (finalize_jump_threads): Do not care about dominance info.
(execute_vrp): Preserve loops through jump threading.
* tree-ssa-threadupdate.c (thread_single_edge,
dbds_continue_enumeration_p, determine_bb_domination_status,
thread_through_loop_header): New functions.
(create_edge_and_update_destination_phis,
create_edge_and_update_destination_phis): Set loops for the new blocks.
(prune_undesirable_thread_requests): Removed.
(redirect_edges): Do not pretend that redirect_edge_and_branch can
create new blocks.
(thread_block): Do not call prune_undesirable_thread_requests.
Update loops.
(mark_threaded_blocks): Select edges to thread here.
(thread_through_all_blocks): Take may_peel_loop_headers argument.
Thread edges through loop headers independently.
* cfgloopmanip.c (create_preheader, mfb_keep_just): Export.
* tree-pass.h (TODO_mark_first_instance): New.
(first_pass_instance): Declare.
* cfghooks.c (duplicate_block): Put the block to the original loop
if copy is not specified.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Preserve loops through
jump threading. Pass may_peel_loop_headers to
thread_through_all_blocks according to first_pass_instance.
* cfgloop.h (create_preheader): Declare.
* tree-flow.h (thread_through_all_blocks): Declaration changed.
* basic-block.h (mfb_keep_just, mfb_kj_edge): Declare.
* passes.c (first_pass_instance): New variable.
(next_pass_1): Set TODO_mark_first_instance.
(execute_todo): Set first_pass_instance.
* gcc.dg/tree-ssa/ssa-dom-thread-2.c: New test.
* gcc.dg/vect/vect-102.c, gcc.dg/vect/vect-103.c,
gcc.dg/vect/vect-104.c: Use more complex construction to prevent vectorizing.
* gcc.dg/tree-ssa/pr21559.c: Update outcome.
From-SVN: r124786
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index a9141d7..5f42ff6 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -5865,13 +5865,7 @@ identify_jump_threads (void) static void finalize_jump_threads (void) { - bool cfg_altered = false; - cfg_altered = thread_through_all_blocks (); - - /* If we threaded jumps, then we need to recompute the dominance - information. */ - if (cfg_altered) - free_dominance_info (CDI_DOMINATORS); + thread_through_all_blocks (false); VEC_free (tree, heap, stack); } @@ -5990,22 +5984,19 @@ vrp_finalize (void) static unsigned int execute_vrp (void) { - insert_range_assertions (); - - loop_optimizer_init (LOOPS_NORMAL); + loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS); if (current_loops) - scev_initialize (); + { + rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa); + scev_initialize (); + } + + insert_range_assertions (); vrp_initialize (); ssa_propagate (vrp_visit_stmt, vrp_visit_phi_node); vrp_finalize (); - if (current_loops) - { - scev_finalize (); - loop_optimizer_finalize (); - } - /* ASSERT_EXPRs must be removed before finalizing jump threads as finalizing jump threads calls the CFG cleanup code which does not properly handle ASSERT_EXPRs. */ @@ -6019,6 +6010,12 @@ execute_vrp (void) update_ssa (TODO_update_ssa); finalize_jump_threads (); + if (current_loops) + { + scev_finalize (); + loop_optimizer_finalize (); + } + return 0; } |