[PATCH 2/2] Introduce prefetch-dynamic-strides option.
Luis Machado
luis.machado@linaro.org
Mon May 7 14:13:00 GMT 2018
On 05/01/2018 03:30 PM, Jeff Law wrote:
> On 01/22/2018 06:46 AM, Luis Machado wrote:
>> The following patch adds an option to control software prefetching of memory
>> references with non-constant/unknown strides.
>>
>> Currently we prefetch these references if the pass thinks there is benefit to
>> doing so. But, since this is all based on heuristics, it's not always the case
>> that we end up with better performance.
>>
>> For Falkor there is also the problem of conflicts with the hardware prefetcher,
>> so we need to be more conservative in terms of what we issue software prefetch
>> hints for.
>>
>> This also aligns GCC with what LLVM does for Falkor.
>>
>> Similarly to the previous patch, the defaults guarantee no change in behavior
>> for other targets and architectures.
>>
>> I've regression-tested and bootstrapped it on aarch64-linux. No problems found.
>>
>> Ok?
>>
>> 2018-01-22 Luis Machado <luis.machado@linaro.org>
>>
>> Introduce option to control whether the software prefetch pass should
>> issue prefetch hints for non-constant strides.
>>
>> gcc/
>> * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
>> <prefetch_dynamic_strides>: New const unsigned int field.
>> * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
>> prefetch_dynamic_strides.
>> (exynosm1_prefetch_tune): Likewise.
>> (thunderxt88_prefetch_tune): Likewise.
>> (thunderx_prefetch_tune): Likewise.
>> (thunderx2t99_prefetch_tune): Likewise.
>> (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to 0.
>> (aarch64_override_options_internal): Update to set
>> PARAM_PREFETCH_DYNAMIC_STRIDES.
>> * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
>> * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
>> * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
>> * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
>> prefetch-dynamic-strides setting.
> OK for the trunk.
> jeff
>
Thanks. Committed as r259996.
More information about the Gcc-patches
mailing list