summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-01 18:26:37 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-01 18:26:37 +0000
commit08162157fe2c4acfabffae1f9729bc0805ad4f0b (patch)
tree730348fe9c15ef1c758714891bae729413c7f6e6 /gcc/tree-ssa-loop-ivcanon.c
parent871e38f44dd2cd109a012e1f7e030f3d33fa3165 (diff)
downloadgcc-08162157fe2c4acfabffae1f9729bc0805ad4f0b.tar.gz
* common.opt (ftree-loop-ivcanon): Enable by default.
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Enable complete loop unrolling. (canonicalize_induction_variables, tree_unroll_loops_completely): Reset scev info. * gcc.dg/tree-ssa/loop-1.c: Check that unrolling occurs already on tree level. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88404 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 66fee03b1a1..4635a023962 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -175,12 +175,9 @@ try_unroll_loop_completely (struct loops *loops ATTRIBUTE_UNUSED,
COND_EXPR_COND (cond) = dont_exit;
modify_stmt (cond);
-#if 0
- /* The necessary infrastructure is not in yet. */
if (!tree_duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
loops, n_unroll, NULL,
NULL, NULL, NULL, 0))
-#endif
{
COND_EXPR_COND (cond) = old_cond;
return false;
@@ -263,6 +260,10 @@ canonicalize_induction_variables (struct loops *loops)
canonicalize_loop_induction_variables (loops, loop, true, false, true);
}
+ /* Clean up the information about numbers of iterations, since brute force
+ evaluation could reveal new information. */
+ scev_reset ();
+
#if 0
/* The necessary infrastructure is not in yet. */
if (changed)
@@ -291,6 +292,10 @@ tree_unroll_loops_completely (struct loops *loops)
!flag_tree_loop_ivcanon);
}
+ /* Clean up the information about numbers of iterations, since complete
+ unrolling might have invalidated it. */
+ scev_reset ();
+
#if 0
/* The necessary infrastructure is not in yet. */
if (changed)