summaryrefslogtreecommitdiff
path: root/gcc/doc/invoke.texi
diff options
context:
space:
mode:
authorluisgpm <luisgpm@138bc75d-0d04-0410-961f-82ee72b054a4>2018-05-07 14:12:54 +0000
committerluisgpm <luisgpm@138bc75d-0d04-0410-961f-82ee72b054a4>2018-05-07 14:12:54 +0000
commit38bd90a9a88bd875f9869309d8cc9becd8e674d6 (patch)
treeaab4e836bba4385064c122da97ae201b12f14fcf /gcc/doc/invoke.texi
parenta2873fd8e72aac26fcf3f53de56c461265fa6731 (diff)
Introduce prefetch-dynamic-strides option.
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. 2018-05-07 Luis Machado <luis.machado@linaro.org> gcc/ * config/aarch64/aarch64-protos.h (cpu_prefetch_tune) <prefetch_dynamic_strides>: New const bool 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 false. (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259996 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r--gcc/doc/invoke.texi10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 7c90abcef05a..7e57e9650f65 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -10733,6 +10733,16 @@ The size of L1 cache, in kilobytes.
@item l2-cache-size
The size of L2 cache, in kilobytes.
+@item prefetch-dynamic-strides
+Whether the loop array prefetch pass should issue software prefetch hints
+for strides that are non-constant. In some cases this may be
+beneficial, though the fact the stride is non-constant may make it
+hard to predict when there is clear benefit to issuing these hints.
+
+Set to 1, the default, if the prefetch hints should be issued for non-constant
+strides. Set to 0 if prefetch hints should be issued only for strides that
+are known to be constant and below @option{prefetch-minimum-stride}.
+
@item prefetch-minimum-stride
Minimum constant stride, in bytes, to start using prefetch hints for. If
the stride is less than this threshold, prefetch hints will not be issued.