From d03f2c17a2152d2398ad30718d8f050fcd1304a0 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 15 Nov 2014 12:06:23 +0000 Subject: [PATCH] tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add log message for max-completely-peeled-insns limit. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add log message for max-completely-peeled-insns limit. From-SVN: r217601 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-loop-ivcanon.c | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9bc412d240..b6f6279a163 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-11-15 Eric Botcazou + + * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add log message + for max-completely-peeled-insns limit. + 2014-11-14 Jan Hubicka * ipa-prop.h (ipa_known_type_data): Remove. diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index 9bc8842946c..c874b8bc04d 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -674,7 +674,7 @@ try_unroll_loop_completely (struct loop *loop, HOST_WIDE_INT maxiter, location_t locus) { - unsigned HOST_WIDE_INT n_unroll = 0, ninsns, max_unroll, unr_insns; + unsigned HOST_WIDE_INT n_unroll = 0, ninsns, unr_insns; gimple cond; struct loop_size size; bool n_unroll_found = false; @@ -720,9 +720,14 @@ try_unroll_loop_completely (struct loop *loop, if (!n_unroll_found) return false; - max_unroll = PARAM_VALUE (PARAM_MAX_COMPLETELY_PEEL_TIMES); - if (n_unroll > max_unroll) - return false; + if (n_unroll > (unsigned) PARAM_VALUE (PARAM_MAX_COMPLETELY_PEEL_TIMES)) + { + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, "Not unrolling loop %d " + "(--param max-completely-peeled-times limit reached).\n", + loop->num); + return false; + } if (!edge_to_cancel) edge_to_cancel = loop_edge_to_cancel (loop); -- 2.30.2