diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-07 16:15:45 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-07 16:15:45 +0000 |
commit | 3665c1ba3f3c8290fde59822a52ce6e8324d4612 (patch) | |
tree | c3e1603c63ace84a3385918e8361fe1918b3ba54 /gcc/tree-ssa-loop-prefetch.c | |
parent | 5e62a3ccccbc506f5bb931cd1c523b3f3f8e52c7 (diff) | |
download | gcc-3665c1ba3f3c8290fde59822a52ce6e8324d4612.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159161 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-prefetch.c')
-rw-r--r-- | gcc/tree-ssa-loop-prefetch.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c index 3377eeb1dbb..6f879887c9f 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 |