aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-copy.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-04-04 20:53:39 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-04-04 20:53:39 +0000
commit862900112e016aa821f4bd659c3e53ac91853f32 (patch)
tree26dd248daf0fd14b57c7421d9111153fca35cc05 /gcc/tree-ssa-copy.c
parenta4d674fc530e3a274c86887967eb820a664787da (diff)
downloadgcc-862900112e016aa821f4bd659c3e53ac91853f32.zip
gcc-862900112e016aa821f4bd659c3e53ac91853f32.tar.gz
gcc-862900112e016aa821f4bd659c3e53ac91853f32.tar.bz2
Makefile.in (tree-ssa-copy.o): Add $(CFGLOOP_H) dependency.
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. From-SVN: r145551
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r--gcc/tree-ssa-copy.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index a02aee0..f582ed0 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);