From 9d799468bfbb26fc095340c19cbf184c6d7e751a Mon Sep 17 00:00:00 2001 From: Cullen Rhodes Date: Tue, 13 Apr 2021 11:46:33 +0000 Subject: [PATCH] [TTI] NFC: Remove unused 'OptSize' parameter from shouldMaximizeVectorBandwidth Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D100377 --- include/llvm/Analysis/TargetTransformInfo.h | 8 ++++---- include/llvm/Analysis/TargetTransformInfoImpl.h | 2 +- lib/Analysis/TargetTransformInfo.cpp | 4 ++-- lib/Target/Hexagon/HexagonTargetTransformInfo.h | 2 +- lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/llvm/Analysis/TargetTransformInfo.h b/include/llvm/Analysis/TargetTransformInfo.h index e1425fe6a58..db07ace4970 100644 --- a/include/llvm/Analysis/TargetTransformInfo.h +++ b/include/llvm/Analysis/TargetTransformInfo.h @@ -939,7 +939,7 @@ public: /// creating vectors that span multiple vector registers. /// If false, the vectorization factor will be chosen based on the /// size of the widest element type. - bool shouldMaximizeVectorBandwidth(bool OptSize) const; + bool shouldMaximizeVectorBandwidth() const; /// \return The minimum vectorization factor for types of given element /// bit width, or 0 if there is no minimum VF. The returned value only @@ -1533,7 +1533,7 @@ public: virtual TypeSize getRegisterBitWidth(RegisterKind K) const = 0; virtual unsigned getMinVectorRegisterBitWidth() = 0; virtual Optional getMaxVScale() const = 0; - virtual bool shouldMaximizeVectorBandwidth(bool OptSize) const = 0; + virtual bool shouldMaximizeVectorBandwidth() const = 0; virtual ElementCount getMinimumVF(unsigned ElemWidth, bool IsScalable) const = 0; virtual unsigned getMaximumVF(unsigned ElemWidth, unsigned Opcode) const = 0; @@ -1976,8 +1976,8 @@ public: Optional getMaxVScale() const override { return Impl.getMaxVScale(); } - bool shouldMaximizeVectorBandwidth(bool OptSize) const override { - return Impl.shouldMaximizeVectorBandwidth(OptSize); + bool shouldMaximizeVectorBandwidth() const override { + return Impl.shouldMaximizeVectorBandwidth(); } ElementCount getMinimumVF(unsigned ElemWidth, bool IsScalable) const override { diff --git a/include/llvm/Analysis/TargetTransformInfoImpl.h b/include/llvm/Analysis/TargetTransformInfoImpl.h index 771b247b842..392c283f979 100644 --- a/include/llvm/Analysis/TargetTransformInfoImpl.h +++ b/include/llvm/Analysis/TargetTransformInfoImpl.h @@ -391,7 +391,7 @@ public: Optional getMaxVScale() const { return None; } - bool shouldMaximizeVectorBandwidth(bool OptSize) const { return false; } + bool shouldMaximizeVectorBandwidth() const { return false; } ElementCount getMinimumVF(unsigned ElemWidth, bool IsScalable) const { return ElementCount::get(0, IsScalable); diff --git a/lib/Analysis/TargetTransformInfo.cpp b/lib/Analysis/TargetTransformInfo.cpp index 8a750e0ad30..1183446c8f4 100644 --- a/lib/Analysis/TargetTransformInfo.cpp +++ b/lib/Analysis/TargetTransformInfo.cpp @@ -596,8 +596,8 @@ Optional TargetTransformInfo::getMaxVScale() const { return TTIImpl->getMaxVScale(); } -bool TargetTransformInfo::shouldMaximizeVectorBandwidth(bool OptSize) const { - return TTIImpl->shouldMaximizeVectorBandwidth(OptSize); +bool TargetTransformInfo::shouldMaximizeVectorBandwidth() const { + return TTIImpl->shouldMaximizeVectorBandwidth(); } ElementCount TargetTransformInfo::getMinimumVF(unsigned ElemWidth, diff --git a/lib/Target/Hexagon/HexagonTargetTransformInfo.h b/lib/Target/Hexagon/HexagonTargetTransformInfo.h index eb8f5d0dc61..1564710e184 100644 --- a/lib/Target/Hexagon/HexagonTargetTransformInfo.h +++ b/lib/Target/Hexagon/HexagonTargetTransformInfo.h @@ -85,7 +85,7 @@ public: unsigned getMinVectorRegisterBitWidth() const; ElementCount getMinimumVF(unsigned ElemWidth, bool IsScalable) const; - bool shouldMaximizeVectorBandwidth(bool OptSize) const { + bool shouldMaximizeVectorBandwidth() const { return true; } bool supportsEfficientVectorElementLoadStore() { diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 1fa7499192a..a371831da38 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -5836,7 +5836,7 @@ LoopVectorizationCostModel::computeFeasibleMaxVF(unsigned ConstTripCount, } ElementCount MaxVF = MaxVectorSize; - if (TTI.shouldMaximizeVectorBandwidth(!isScalarEpilogueAllowed()) || + if (TTI.shouldMaximizeVectorBandwidth() || (MaximizeBandwidth && isScalarEpilogueAllowed())) { // Collect all viable vectorization factors larger than the default MaxVF // (i.e. MaxVectorSize).