diff options
author | Jeff Law <law@redhat.com> | 2006-03-20 22:07:37 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2006-03-20 22:07:37 -0700 |
commit | e67c25c7381536222d154228d16467320ea1fcf8 (patch) | |
tree | 199bbfcaab0678283b684b3453409019e876c0b4 /gcc/passes.c | |
parent | 4a282de4b36221c7168bf10ad0dc8836b374cfb8 (diff) | |
download | gcc-e67c25c7381536222d154228d16467320ea1fcf8.zip gcc-e67c25c7381536222d154228d16467320ea1fcf8.tar.gz gcc-e67c25c7381536222d154228d16467320ea1fcf8.tar.bz2 |
tree-pass.h (pass_phi_only_copy_prop): Delete.
* tree-pass.h (pass_phi_only_copy_prop): Delete.
(pass_phi_only_cprop): Declare.
* passes.c (init_optimization_passes): Replace pass_phi_only_copy_prop
with phi_only_cprop
* tree-ssa-dom.c (degenerate_phi_result): New function.
(remove_stmt_or_phi, get_lhs_or_phi_result): Likewise.
(get_rhs_or_phi_arg, propagate_rhs_into_lhs): Likewise.
(eliminate_const_or_copy, eliminate_degenerate_phis_1): Likewise.
(eliminate_degenerate_phis): Likewise.
(pass_phi_only_cprop): New pass descriptor.
* tree-ssa-copy.c (init_copy_prop): Lose PHIS_ONLY argument and
support code. Callers updated.
(execute_copy_prop, do_copy_prop): Likewise and corresponding changes.
(store_copy_prop): Likewise.
(do_phi_only_copy_prop, pass_phi_only_copy_prop): Remove.
* gcc.dg/tree-ssa/pr21829.c: New test.
From-SVN: r112242
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index 4dd4ac8..ab37f20 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -505,11 +505,12 @@ init_optimization_passes (void) NEXT_PASS (pass_dce); NEXT_PASS (pass_dominator); - /* The only copy propagation opportunities left after DOM - should be due to degenerate PHI nodes. So rather than - run the full copy propagator, just discover and copy - propagate away the degenerate PHI nodes. */ - NEXT_PASS (pass_phi_only_copy_prop); + /* The only const/copy propagation opportunities left after + DOM should be due to degenerate PHI nodes. So rather than + run the full propagators, run a specialized pass which + only examines PHIs to discover const/copy propagation + opportunities. */ + NEXT_PASS (pass_phi_only_cprop); NEXT_PASS (pass_phiopt); NEXT_PASS (pass_may_alias); @@ -526,11 +527,12 @@ init_optimization_passes (void) NEXT_PASS (pass_rename_ssa_copies); NEXT_PASS (pass_dominator); - /* The only copy propagation opportunities left after DOM - should be due to degenerate PHI nodes. So rather than - run the full copy propagator, just discover and copy - propagate away the degenerate PHI nodes. */ - NEXT_PASS (pass_phi_only_copy_prop); + /* The only const/copy propagation opportunities left after + DOM should be due to degenerate PHI nodes. So rather than + run the full propagators, run a specialized pass which + only examines PHIs to discover const/copy propagation + opportunities. */ + NEXT_PASS (pass_phi_only_cprop); NEXT_PASS (pass_reassoc); NEXT_PASS (pass_dce); @@ -556,11 +558,12 @@ init_optimization_passes (void) NEXT_PASS (pass_vrp); NEXT_PASS (pass_dominator); - /* The only copy propagation opportunities left after DOM - should be due to degenerate PHI nodes. So rather than - run the full copy propagator, just discover and copy - propagate away the degenerate PHI nodes. */ - NEXT_PASS (pass_phi_only_copy_prop); + /* The only const/copy propagation opportunities left after + DOM should be due to degenerate PHI nodes. So rather than + run the full propagators, run a specialized pass which + only examines PHIs to discover const/copy propagation + opportunities. */ + NEXT_PASS (pass_phi_only_cprop); NEXT_PASS (pass_cd_dce); |