aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/TargetTransformInfo.cpp
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2016-03-18 00:27:43 +0000
committerAdam Nemet <anemet@apple.com>2016-03-18 00:27:43 +0000
commit709e3046ee3c473b373fe5ec61e4d6e467991898 (patch)
tree48c80521787e640be1608d9991f919853facfb6f /llvm/lib/Analysis/TargetTransformInfo.cpp
parent6d8beeca5302984e845d9c6d7bf0a9e4a5ca98f9 (diff)
downloadllvm-709e3046ee3c473b373fe5ec61e4d6e467991898.zip
llvm-709e3046ee3c473b373fe5ec61e4d6e467991898.tar.gz
llvm-709e3046ee3c473b373fe5ec61e4d6e467991898.tar.bz2
[LoopDataPrefetch] Add TTI to limit the number of iterations to prefetch ahead
Summary: It can hurt performance to prefetch ahead too much. Be conservative for now and don't prefetch ahead more than 3 iterations on Cyclone. Reviewers: hfinkel Subscribers: llvm-commits, mzolotukhin Differential Revision: http://reviews.llvm.org/D17949 llvm-svn: 263772
Diffstat (limited to 'llvm/lib/Analysis/TargetTransformInfo.cpp')
-rw-r--r--llvm/lib/Analysis/TargetTransformInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index 8fd9fbf..b64d413 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -227,6 +227,10 @@ unsigned TargetTransformInfo::getMinPrefetchStride() const {
return TTIImpl->getMinPrefetchStride();
}
+unsigned TargetTransformInfo::getMaxPrefetchIterationsAhead() const {
+ return TTIImpl->getMaxPrefetchIterationsAhead();
+}
+
unsigned TargetTransformInfo::getMaxInterleaveFactor(unsigned VF) const {
return TTIImpl->getMaxInterleaveFactor(VF);
}