aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2004-10-01 20:26:37 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2004-10-01 18:26:37 +0000
commit47bcd07d56940085a9b606833d729812ea9c02a2 (patch)
tree730348fe9c15ef1c758714891bae729413c7f6e6 /gcc/tree-ssa-loop-ivcanon.c
parent734268f5901c7691b3fc9e33a9e22fc1c4f8b0bb (diff)
downloadgcc-47bcd07d56940085a9b606833d729812ea9c02a2.zip
gcc-47bcd07d56940085a9b606833d729812ea9c02a2.tar.gz
gcc-47bcd07d56940085a9b606833d729812ea9c02a2.tar.bz2
common.opt (ftree-loop-ivcanon): Enable by default.
* 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. From-SVN: r88404
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 66fee03..4635a02 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)