summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 14:42:42 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-01 14:42:42 +0000
commitf00b5e356b0d32c82a91371060636a9a3278caac (patch)
treea943f2f3ae810f1ce3d69eb444965504fc297e63 /gcc/tree-ssa-loop-ivcanon.c
parentaaa9964b9cd7e1850d2a3f7ffa6a5ea32c27bfdd (diff)
downloadgcc-f00b5e356b0d32c82a91371060636a9a3278caac.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138522 138bc75d-0d04-0410-961f-82ee72b054a4
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 dc863f8b8a5..00965465342 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)
{