diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-03-27 16:14:11 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-03-27 16:14:11 +0000 |
commit | 5d93fdfa898fb1fcfd574770362e5c79ba2deb2b (patch) | |
tree | 1d0667539261ed0a9cd0eb03629cbf121c6fec1e /llvm/lib/Transforms | |
parent | 22458ea7aa968518e275909c4cec52c110f23072 (diff) | |
download | bcm5719-llvm-5d93fdfa898fb1fcfd574770362e5c79ba2deb2b.tar.gz bcm5719-llvm-5d93fdfa898fb1fcfd574770362e5c79ba2deb2b.zip |
[LV] Add TTI::shouldMaximizeVectorBandwidth to allow enabling it per target
The default implementation returns false and keeps the current behavior.
Differential Revision: https://reviews.llvm.org/D44735
llvm-svn: 328632
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index ba07ebe1e51..a80c7f94e8d 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -6139,7 +6139,8 @@ LoopVectorizationCostModel::computeFeasibleMaxVF(bool OptForSize, } unsigned MaxVF = MaxVectorSize; - if (MaximizeBandwidth && !OptForSize) { + if (TTI.shouldMaximizeVectorBandwidth(OptForSize) || + (MaximizeBandwidth && !OptForSize)) { // Collect all viable vectorization factors larger than the default MaxVF // (i.e. MaxVectorSize). SmallVector<unsigned, 8> VFs; |