aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-08-01 14:42:42 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-08-01 14:42:42 +0000
commit678e7c65045fdf63464adaa74de3a43e03c76ef5 (patch)
treea943f2f3ae810f1ce3d69eb444965504fc297e63 /gcc/tree-ssa-loop-ivcanon.c
parent769b26a6bd8c203097c0f79ecca9956e2c02ac69 (diff)
downloadgcc-678e7c65045fdf63464adaa74de3a43e03c76ef5.zip
gcc-678e7c65045fdf63464adaa74de3a43e03c76ef5.tar.gz
gcc-678e7c65045fdf63464adaa74de3a43e03c76ef5.tar.bz2
tree-ssa-pre.c (fini_pre): Take in_fre parameter.
2008-08-01 Richard Guenther <rguenther@suse.de> * tree-ssa-pre.c (fini_pre): Take in_fre parameter. Free loop information only if we initialized it. (execute_pre): Call fini_pre with in_fre. * tree-ssa-loop-ivcanon (try_unroll_loop_completely): Dump if we do not unroll because we hit max-completely-peeled-insns. Use our estimation for consistency, do allow shrinking. From-SVN: r138522
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index dc863f8..0096546 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -184,10 +184,6 @@ try_unroll_loop_completely (struct loop *loop,
ninsns = tree_num_loop_insns (loop, &eni_size_weights);
- if (n_unroll * ninsns
- > (unsigned) PARAM_VALUE (PARAM_MAX_COMPLETELY_PEELED_INSNS))
- return false;
-
unr_insns = estimated_unrolled_size (ninsns, n_unroll);
if (dump_file && (dump_flags & TDF_DETAILS))
{
@@ -196,6 +192,17 @@ try_unroll_loop_completely (struct loop *loop,
(int) unr_insns);
}
+ if (unr_insns > ninsns
+ && (unr_insns
+ > (unsigned) PARAM_VALUE (PARAM_MAX_COMPLETELY_PEELED_INSNS)))
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, "Not unrolling loop %d "
+ "(--param max-completely-peeled-insns limit reached).\n",
+ loop->num);
+ return false;
+ }
+
if (ul == UL_NO_GROWTH
&& unr_insns > ninsns)
{