diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-02 16:34:29 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-02 16:34:29 +0000 |
commit | 5a91155f3ea2d63559d86797775c9c04b2ef7c05 (patch) | |
tree | 126ae0acb0967dcd6c470c42705dd86addbd1cc9 | |
parent | ef51b8e123ec066d8018c127537089b76f6a383e (diff) | |
download | gcc-5a91155f3ea2d63559d86797775c9c04b2ef7c05.tar.gz |
PR 44576: miss rate computation improvement for prefetching loop arrays.
2010-07-02 Changpeng Fang <changpeng.fang@amd.com>
PR middle-end/44576
* tree-ssa-loop-prefetch.c (compute_miss_rate): Return 1000 (out
of 1000) for miss rate if the address diference is greater than or
equal to the cache line size (the two reference will never hit the
same cache line).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161727 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-prefetch.c | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd7b258b499..7e7944a6618 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2010-07-02 Changpeng Fang <changpeng.fang@amd.com> + + PR middle-end/44576 + * tree-ssa-loop-prefetch.c (compute_miss_rate): Return 1000 (out + of 1000) for miss rate if the address diference is greater than or + equal to the cache line size (the two reference will never hit the + same cache line). + 2010-07-02 Bernd Schmidt <bernds@codesourcery.com> PR target/42835 diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c index 65474898ad9..934b49c0406 100644 --- a/gcc/tree-ssa-loop-prefetch.c +++ b/gcc/tree-ssa-loop-prefetch.c @@ -654,6 +654,11 @@ compute_miss_rate (unsigned HOST_WIDE_INT cache_line_size, int total_positions, miss_positions, miss_rate; int address1, address2, cache_line1, cache_line2; + /* It always misses if delta is greater than or equal to the cache + line size. */ + if (delta >= cache_line_size) + return 1000; + total_positions = 0; miss_positions = 0; |