From 1aabe697f03d7bb006744c168b1a51494ed2644d Mon Sep 17 00:00:00 2001 From: spop Date: Wed, 9 Jun 2010 22:51:46 +0000 Subject: [PATCH] Adjust the threshold value of PREFETCH_MOD_TO_UNROLL_FACTOR_RATIO 2010-06-09 Changpeng Fang * tree-ssa-loop-prefetch.c (PREFETCH_MOD_TO_UNROLL_FACTOR_RATIO) : Change the PREFETCH_MOD_TO_UNROLL_FACTOR_RATIO threshold value from 8 to 4. Minor change of the related comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160514 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-loop-prefetch.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8babd20f44f8..960d11c87950 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-06-09 Changpeng Fang + + * tree-ssa-loop-prefetch.c (PREFETCH_MOD_TO_UNROLL_FACTOR_RATIO) : + Change the PREFETCH_MOD_TO_UNROLL_FACTOR_RATIO threshold value from + 8 to 4. Minor change of the related comments. + 2010-06-09 Sebastian Pop * tree-scalar-evolution.c (instantiate_scev_name): Do not fail diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c index 9ccf72e18b2c..705ee81b9c80 100644 --- a/gcc/tree-ssa-loop-prefetch.c +++ b/gcc/tree-ssa-loop-prefetch.c @@ -228,13 +228,13 @@ struct mem_ref_group /* Do not generate a prefetch if the unroll factor is significantly less than what is required by the prefetch. This is to avoid redundant - prefetches. For example, if prefetch_mod is 16 and unroll_factor is - 1, this means prefetching requires unrolling the loop 16 times, but - the loop is not going to be unrolled. In this case (ratio = 16), + prefetches. For example, when prefetch_mod is 16 and unroll_factor is + 2, prefetching requires unrolling the loop 16 times, but + the loop is actually unrolled twice. In this case (ratio = 8), prefetching is not likely to be beneficial. */ #ifndef PREFETCH_MOD_TO_UNROLL_FACTOR_RATIO -#define PREFETCH_MOD_TO_UNROLL_FACTOR_RATIO 8 +#define PREFETCH_MOD_TO_UNROLL_FACTOR_RATIO 4 #endif /* The memory reference. */ -- 2.47.2