aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2005-07-19 00:44:45 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2005-07-19 00:44:45 +0000
commit9fa264571da0247ed1b0d0d0e64897f7b3731c50 (patch)
treec385557766dd5c60a8bac1e0c9af12556c6bcdb0 /gcc/passes.c
parent067b91227a62dd6dbf67d54d39221a07281f8b3d (diff)
downloadgcc-9fa264571da0247ed1b0d0d0e64897f7b3731c50.zip
gcc-9fa264571da0247ed1b0d0d0e64897f7b3731c50.tar.gz
gcc-9fa264571da0247ed1b0d0d0e64897f7b3731c50.tar.bz2
loop-init.c (rest_of_handle_loop2): Remove.
* loop-init.c (rest_of_handle_loop2): Remove. (rtl_loop_init, rtl_loop_done, rtl_move_loop_invariants, rtl_unswitch, rtl_unroll_and_peel_loops, rtl_doloop): New functions. (pass_rtl_loop_init, pass_rtl_loop_done, pass_rtl_move_loop_invariants, pass_rtl_unswitch, pass_rtl_unroll_and_peel_loops, pass_rtl_doloop): New passes. * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_loop_done, pass_unswitch): Rename to pass_tree_loop, pass_tree_loop_init, pass_tree_loop_done, and pass_tree_unswitch. (gate_loop): Rename to gate_tree_loop. * passes.c (init_optimization_passes): Update for renamed tree loop passes. Add the new loop2 passes as subpasses of loop2. * tree-pass.h: Add extern declarations for the new loop2 subpasses. Update for the renamed tree loop passes. From-SVN: r102149
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index edc75f1..efe3e5b 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -525,7 +525,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_reassoc);
NEXT_PASS (pass_pre);
NEXT_PASS (pass_sink_code);
- NEXT_PASS (pass_loop);
+ NEXT_PASS (pass_tree_loop);
NEXT_PASS (pass_dominator);
NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_cd_dce);
@@ -553,11 +553,11 @@ init_optimization_passes (void)
NEXT_PASS (pass_cleanup_cfg_post_optimizing);
*p = NULL;
- p = &pass_loop.sub;
- NEXT_PASS (pass_loop_init);
+ p = &pass_tree_loop.sub;
+ NEXT_PASS (pass_tree_loop_init);
NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_lim);
- NEXT_PASS (pass_unswitch);
+ NEXT_PASS (pass_tree_unswitch);
NEXT_PASS (pass_scev_cprop);
NEXT_PASS (pass_empty_loop);
NEXT_PASS (pass_record_bounds);
@@ -571,9 +571,18 @@ init_optimization_passes (void)
NEXT_PASS (pass_lower_vector_ssa);
NEXT_PASS (pass_complete_unroll);
NEXT_PASS (pass_iv_optimize);
- NEXT_PASS (pass_loop_done);
+ NEXT_PASS (pass_tree_loop_done);
*p = NULL;
+ p = &pass_loop2.sub;
+ NEXT_PASS (pass_rtl_loop_init);
+ NEXT_PASS (pass_rtl_move_loop_invariants);
+ NEXT_PASS (pass_rtl_unswitch);
+ NEXT_PASS (pass_rtl_unroll_and_peel_loops);
+ NEXT_PASS (pass_rtl_doloop);
+ NEXT_PASS (pass_rtl_loop_done);
+ *p = NULL;
+
p = &pass_rest_of_compilation.sub;
NEXT_PASS (pass_remove_unnecessary_notes);
NEXT_PASS (pass_init_function);
@@ -592,6 +601,9 @@ init_optimization_passes (void)
NEXT_PASS (pass_profiling);
NEXT_PASS (pass_rtl_ifcvt);
NEXT_PASS (pass_tracer);
+ /* Perform loop optimizations. It might be better to do them a bit
+ sooner, but we want the profile feedback to work more
+ efficiently. */
NEXT_PASS (pass_loop2);
NEXT_PASS (pass_web);
NEXT_PASS (pass_cse2);