aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorChangpeng Fang <changpeng.fang@amd.com>2010-05-07 16:15:45 +0000
committerSebastian Pop <spop@gcc.gnu.org>2010-05-07 16:15:45 +0000
commit55e5a2ebc01680658d0e918a5bdb00d119dd8813 (patch)
treec3e1603c63ace84a3385918e8361fe1918b3ba54 /gcc
parentbb408e876c536829cc57439df8e4a28c43e68456 (diff)
downloadgcc-55e5a2ebc01680658d0e918a5bdb00d119dd8813.zip
gcc-55e5a2ebc01680658d0e918a5bdb00d119dd8813.tar.gz
gcc-55e5a2ebc01680658d0e918a5bdb00d119dd8813.tar.bz2
Dump a diagnostic info when the insn-to-mem ratio is too small.
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-ssa-loop-prefetch.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 486a713..be06998 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index 3377eeb..6f87988 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -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