Dump a diagnostic info when the insn-to-mem ratio is too small.
authorChangpeng Fang <changpeng.fang@amd.com>
Fri, 7 May 2010 16:15:45 +0000 (16:15 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Fri, 7 May 2010 16:15:45 +0000 (16:15 +0000)
2010-05-07  Changpeng Fang  <changpeng.fang@amd.com>

* tree-ssa-loop-prefetch.c (is_loop_prefetching_profitable): Dump
a diagnostic info when the insn-to-mem ratio is too small.

From-SVN: r159161

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

index 486a7137104dcdd79722e7baf6d0bf423f3f3373..be069988308e678601bc36cf6d418bc44c7e259b 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-07  Changpeng Fang  <changpeng.fang@amd.com>
+
+       * tree-ssa-loop-prefetch.c (is_loop_prefetching_profitable): Dump
+       a diagnostic info when the insn-to-mem ratio is too small.
+
 2010-05-07  Richard Guenther <rguenther@suse.de>
 
        * gcc.c (LINK_COMMAND_SPEC): Provide a resolution file to
index 3377eeb1dbb1ced88a7ee9636707f37a63d0269c..6f879887c9f37df076c602668e2fef2facaa15a8 100644 (file)
@@ -1551,7 +1551,13 @@ is_loop_prefetching_profitable (unsigned ahead, HOST_WIDE_INT est_niter,
   insn_to_mem_ratio = ninsns / mem_ref_count;
 
   if (insn_to_mem_ratio < PREFETCH_MIN_INSN_TO_MEM_RATIO)
-    return false;
+    {
+      if (dump_file && (dump_flags & TDF_DETAILS))
+        fprintf (dump_file,
+                "Not prefetching -- instruction to memory reference ratio (%d) too small\n",
+                insn_to_mem_ratio);
+      return false;
+    }
 
   /* Profitability of prefetching is highly dependent on the trip count.
      For a given AHEAD distance, the first AHEAD iterations do not benefit