diff options
author | Adam Nemet <anemet@apple.com> | 2016-01-27 22:21:25 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2016-01-27 22:21:25 +0000 |
commit | dadfbb52f771fc3d3dc9721714598630f5d53146 (patch) | |
tree | 839a9e415e9a8ae166c2969104db4d60925790b9 /llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp | |
parent | 4c9ac7d7df7668773cfe621c3711a8aacbb5760b (diff) | |
download | bcm5719-llvm-dadfbb52f771fc3d3dc9721714598630f5d53146.tar.gz bcm5719-llvm-dadfbb52f771fc3d3dc9721714598630f5d53146.zip |
[TTI] Add getPrefetchDistance from PPCLoopDataPrefetch, NFC
This patch is part of the work to make PPCLoopDataPrefetch
target-independent
(http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758).
As it was discussed in the above thread, getPrefetchDistance is
currently using instruction count which may change in the future.
llvm-svn: 258995
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp index b60c07c3672..9212e916f59 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp @@ -27,6 +27,12 @@ static cl::opt<unsigned> CacheLineSize("ppc-loop-prefetch-cache-line", cl::Hidden, cl::init(64), cl::desc("The loop prefetch cache line size")); +// This seems like a reasonable default for the BG/Q (this pass is enabled, by +// default, only on the BG/Q). +static cl::opt<unsigned> +PrefDist("ppc-loop-prefetch-distance", cl::Hidden, cl::init(300), + cl::desc("The loop prefetch distance")); + //===----------------------------------------------------------------------===// // // PPC cost model. @@ -242,6 +248,8 @@ unsigned PPCTTIImpl::getCacheLineSize() { return CacheLineSize; } +unsigned PPCTTIImpl::getPrefetchDistance() { return PrefDist; } + unsigned PPCTTIImpl::getMaxInterleaveFactor(unsigned VF) { unsigned Directive = ST->getDarwinDirective(); // The 440 has no SIMD support, but floating-point instructions |