Commit 57762e97 by Christian Borntraeger Committed by Andreas Krebbel

tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Reset prefetch_before to…

tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Reset prefetch_before to PREFETCH_ALL if to accesses "meet" beyond cache size.

2010-05-11  Christian Borntraeger  <borntraeger@de.ibm.com>

        * tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Reset
	prefetch_before to PREFETCH_ALL if to accesses "meet" beyond
	cache size.

From-SVN: r159257
parent a8beb3a7
2010-05-11 Christian Borntraeger <borntraeger@de.ibm.com>
* tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Reset
prefetch_before to PREFETCH_ALL if to accesses "meet" beyond
cache size.
2010-05-11 Christian Borntraeger <borntraeger@de.ibm.com>
* tree-ssa-loop-prefetch.c: Add debug for dropped prefetches.
2010-05-11 Jakub Jelinek <jakub@redhat.com>
......
......@@ -716,6 +716,9 @@ prune_ref_by_group_reuse (struct mem_ref *ref, struct mem_ref *by,
hit_from = ddown (delta_b, PREFETCH_BLOCK) * PREFETCH_BLOCK;
prefetch_before = (hit_from - delta_r + step - 1) / step;
/* Do not reduce prefetch_before if we meet beyond cache size. */
if (prefetch_before > abs (L2_CACHE_SIZE_BYTES / step))
prefetch_before = PREFETCH_ALL;
if (prefetch_before < ref->prefetch_before)
ref->prefetch_before = prefetch_before;
......@@ -746,6 +749,9 @@ prune_ref_by_group_reuse (struct mem_ref *ref, struct mem_ref *by,
reduced_prefetch_block, align_unit);
if (miss_rate <= ACCEPTABLE_MISS_RATE)
{
/* Do not reduce prefetch_before if we meet beyond cache size. */
if (prefetch_before > L2_CACHE_SIZE_BYTES / PREFETCH_BLOCK)
prefetch_before = PREFETCH_ALL;
if (prefetch_before < ref->prefetch_before)
ref->prefetch_before = prefetch_before;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment