tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add log message for max-complet...
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 15 Nov 2014 12:06:23 +0000 (12:06 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 15 Nov 2014 12:06:23 +0000 (12:06 +0000)
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add log message
for max-completely-peeled-insns limit.

From-SVN: r217601

gcc/ChangeLog
gcc/tree-ssa-loop-ivcanon.c

index c9bc412d24084a1076edc0a8fece69e6209b4f30..b6f6279a163b38a31eed2264e08fdaef554dbd10 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-15  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add log message
+       for max-completely-peeled-insns limit.
+
 2014-11-14  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-prop.h (ipa_known_type_data): Remove.
index 9bc8842946c6030c0be8e7126f9099befaafef47..c874b8bc04d8315273abe7b3800125c50f5be288 100644 (file)
@@ -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);