diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-04 20:53:39 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-04 20:53:39 +0000 |
commit | 23a3430de3127bdade43a22298b23d1f0291d892 (patch) | |
tree | 26dd248daf0fd14b57c7421d9111153fca35cc05 /gcc/tree-ssa-copy.c | |
parent | a409f9278ec98a2124072df78c9553d5c0066900 (diff) | |
download | gcc-23a3430de3127bdade43a22298b23d1f0291d892.tar.gz |
2009-04-04 Richard Guenther <rguenther@suse.de>
* Makefile.in (tree-ssa-copy.o): Add $(CFGLOOP_H) dependency.
* tree-ssa-copy.c (init_copy_prop): Do not propagate through
single-argument PHIs if we are in loop-closed SSA form.
* tree-vect-loop-manip.c (slpeel_add_loop_guard): Pass extra guards
for the pre-condition.
(slpeel_tree_peel_loop_to_edge): Likewise.
(vect_build_loop_niters): Take an optional sequence to append stmts.
(vect_generate_tmps_on_preheader): Likewise.
(vect_do_peeling_for_loop_bound): Take extra guards for the
pre-condition.
(vect_do_peeling_for_alignment): Adjust. Unconditionally apply
the cost model check.
(vect_loop_versioning): Take stmt and stmt list to put pre-condition
guards if we are going to peel. Do not apply versioning in that
case.
* tree-vectorizer.h (vect_loop_versioning): Adjust declaration.
(vect_do_peeling_for_loop_bound): Likewise.
* tree-vect-loop.c (vect_transform_loop): If we are peeling for
loop bound only record extra pre-conditions, do not apply loop
versioning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r-- | gcc/tree-ssa-copy.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index a02aee0ca49..f582ed0f996 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-pass.h" #include "tree-ssa-propagate.h" #include "langhooks.h" +#include "cfgloop.h" /* This file implements the copy propagation pass and provides a handful of interfaces for performing const/copy propagation and @@ -885,7 +886,13 @@ init_copy_prop (void) tree def; def = gimple_phi_result (phi); - if (!is_gimple_reg (def)) + if (!is_gimple_reg (def) + /* In loop-closed SSA form do not copy-propagate through + PHI nodes. Technically this is only needed for loop + exit PHIs, but this is difficult to query. */ + || (current_loops + && gimple_phi_num_args (phi) == 1 + && loops_state_satisfies_p (LOOP_CLOSED_SSA))) prop_set_simulate_again (phi, false); else prop_set_simulate_again (phi, true); |