summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2016-03-29 23:45:52 +0000
committerAdam Nemet <anemet@apple.com>2016-03-29 23:45:52 +0000
commit1428d41f9a8a9dfed10b12b756a8a78a9d38a572 (patch)
treeb0a48e16e7aad6738ea0b4c3774e4356669d369d /llvm/lib/Target
parent1a470b6f7cc2530db8ef28222e5b094f7fdc8825 (diff)
downloadbcm5719-llvm-1428d41f9a8a9dfed10b12b756a8a78a9d38a572.tar.gz
bcm5719-llvm-1428d41f9a8a9dfed10b12b756a8a78a9d38a572.zip
[LoopDataPrefetch] Centralize the tuning cl::opts under the pass
This is effectively NFC, minus the renaming of the options (-cyclone-prefetch-distance -> -prefetch-distance). The change was requested by Tim in D17943. llvm-svn: 264806
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp27
1 files changed, 6 insertions, 21 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index 2b3fae958f4..87f96f80040 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -20,24 +20,6 @@ using namespace llvm;
#define DEBUG_TYPE "aarch64tti"
-static cl::opt<unsigned> CyclonePrefetchDistance(
- "cyclone-prefetch-distance",
- cl::desc("Number of instructions to prefetch ahead for Cyclone"),
- cl::init(280), cl::Hidden);
-
-// The HW prefetcher handles accesses with strides up to 2KB.
-static cl::opt<unsigned> CycloneMinPrefetchStride(
- "cyclone-min-prefetch-stride",
- cl::desc("Min stride to add prefetches for Cyclone"),
- cl::init(2048), cl::Hidden);
-
-// Be conservative for now and don't prefetch ahead too much since the loop
-// may terminate early.
-static cl::opt<unsigned> CycloneMaxPrefetchIterationsAhead(
- "cyclone-max-prefetch-iters-ahead",
- cl::desc("Max number of iterations to prefetch ahead on Cyclone"),
- cl::init(3), cl::Hidden);
-
/// \brief Calculate the cost of materializing a 64-bit value. This helper
/// method might only calculate a fraction of a larger immediate. Therefore it
/// is valid to return a cost of ZERO.
@@ -600,18 +582,21 @@ unsigned AArch64TTIImpl::getCacheLineSize() {
unsigned AArch64TTIImpl::getPrefetchDistance() {
if (ST->isCyclone())
- return CyclonePrefetchDistance;
+ return 280;
return BaseT::getPrefetchDistance();
}
unsigned AArch64TTIImpl::getMinPrefetchStride() {
if (ST->isCyclone())
- return CycloneMinPrefetchStride;
+ // The HW prefetcher handles accesses with strides up to 2KB.
+ return 2048;
return BaseT::getMinPrefetchStride();
}
unsigned AArch64TTIImpl::getMaxPrefetchIterationsAhead() {
if (ST->isCyclone())
- return CycloneMaxPrefetchIterationsAhead;
+ // Be conservative for now and don't prefetch ahead too much since the loop
+ // may terminate early.
+ return 3;
return BaseT::getMaxPrefetchIterationsAhead();
}
OpenPOWER on IntegriCloud