aboutsummaryrefslogtreecommitdiff
path: root/gcc/params.def
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@linaro.org>2018-05-07 14:12:54 +0000
committerLuis Machado <luisgpm@gcc.gnu.org>2018-05-07 14:12:54 +0000
commit005e72b9ddb6b2d9d954b7a48c3d3c28972fff4d (patch)
treeaab4e836bba4385064c122da97ae201b12f14fcf /gcc/params.def
parent57e2d1175cf972b0a352be46903d87633304ce4e (diff)
downloadgcc-005e72b9ddb6b2d9d954b7a48c3d3c28972fff4d.zip
gcc-005e72b9ddb6b2d9d954b7a48c3d3c28972fff4d.tar.gz
gcc-005e72b9ddb6b2d9d954b7a48c3d3c28972fff4d.tar.bz2
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. From-SVN: r259996
Diffstat (limited to 'gcc/params.def')
-rw-r--r--gcc/params.def9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/params.def b/gcc/params.def
index 2166deb..7408843 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -790,6 +790,15 @@ DEFPARAM (PARAM_L2_CACHE_SIZE,
"The size of L2 cache.",
512, 0, 0)
+/* Whether software prefetch hints should be issued for non-constant
+ strides. */
+
+DEFPARAM (PARAM_PREFETCH_DYNAMIC_STRIDES,
+ "prefetch-dynamic-strides",
+ "Whether software prefetch hints should be issued for non-constant "
+ "strides.",
+ 1, 0, 1)
+
/* The minimum constant stride beyond which we should use prefetch hints
for. */