From 08162157fe2c4acfabffae1f9729bc0805ad4f0b Mon Sep 17 00:00:00 2001 From: rakdver Date: Fri, 1 Oct 2004 18:26:37 +0000 Subject: * 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 --- gcc/tree-ssa-loop-ivcanon.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gcc/tree-ssa-loop-ivcanon.c') 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) -- cgit v1.2.1