[llvm] r227741 - [multiversion] Remove the function parameter from the unrolling
Chandler Carruth
chandlerc at gmail.com
Sun Feb 1 06:31:24 PST 2015
Author: chandlerc
Date: Sun Feb 1 08:31:23 2015
New Revision: 227741
URL: http://llvm.org/viewvc/llvm-project?rev=227741&view=rev
Log:
[multiversion] Remove the function parameter from the unrolling
preferences interface on TTI now that all of TTI is per-function.
Modified:
llvm/trunk/include/llvm/Analysis/FunctionTargetTransformInfo.h
llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h
llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h
llvm/trunk/lib/Analysis/TargetTransformInfo.cpp
llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.h
llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.h
Modified: llvm/trunk/include/llvm/Analysis/FunctionTargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/FunctionTargetTransformInfo.h?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/FunctionTargetTransformInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/FunctionTargetTransformInfo.h Sun Feb 1 08:31:23 2015
@@ -42,7 +42,7 @@ public:
void
getUnrollingPreferences(Loop *L,
TargetTransformInfo::UnrollingPreferences &UP) const {
- TTI->getUnrollingPreferences(Fn, L, UP);
+ TTI->getUnrollingPreferences(L, UP);
}
};
}
Modified: llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h Sun Feb 1 08:31:23 2015
@@ -249,8 +249,7 @@ public:
/// \brief Get target-customized preferences for the generic loop unrolling
/// transformation. The caller will initialize UP with the current
/// target-independent defaults.
- void getUnrollingPreferences(const Function *F, Loop *L,
- UnrollingPreferences &UP) const;
+ void getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) const;
/// @}
@@ -499,8 +498,7 @@ public:
virtual unsigned getUserCost(const User *U) = 0;
virtual bool hasBranchDivergence() = 0;
virtual bool isLoweredToCall(const Function *F) = 0;
- virtual void getUnrollingPreferences(const Function *F, Loop *L,
- UnrollingPreferences &UP) = 0;
+ virtual void getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) = 0;
virtual bool isLegalAddImmediate(int64_t Imm) = 0;
virtual bool isLegalICmpImmediate(int64_t Imm) = 0;
virtual bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV,
@@ -596,9 +594,8 @@ public:
bool isLoweredToCall(const Function *F) override {
return Impl.isLoweredToCall(F);
}
- void getUnrollingPreferences(const Function *F, Loop *L,
- UnrollingPreferences &UP) override {
- return Impl.getUnrollingPreferences(F, L, UP);
+ void getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) override {
+ return Impl.getUnrollingPreferences(L, UP);
}
bool isLegalAddImmediate(int64_t Imm) override {
return Impl.isLegalAddImmediate(Imm);
Modified: llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h (original)
+++ llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h Sun Feb 1 08:31:23 2015
@@ -198,8 +198,7 @@ public:
return true;
}
- void getUnrollingPreferences(const Function *, Loop *,
- TTI::UnrollingPreferences &) {}
+ void getUnrollingPreferences(Loop *, TTI::UnrollingPreferences &) {}
bool isLegalAddImmediate(int64_t Imm) { return false; }
Modified: llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h (original)
+++ llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h Sun Feb 1 08:31:23 2015
@@ -167,8 +167,7 @@ public:
TLI->isOperationLegalOrCustom(ISD::FSQRT, VT);
}
- void getUnrollingPreferences(const Function *F, Loop *L,
- TTI::UnrollingPreferences &UP) {
+ void getUnrollingPreferences(Loop *L, TTI::UnrollingPreferences &UP) {
// This unrolling functionality is target independent, but to provide some
// motivation for its intended use, for x86:
Modified: llvm/trunk/lib/Analysis/TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TargetTransformInfo.cpp?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/TargetTransformInfo.cpp Sun Feb 1 08:31:23 2015
@@ -81,8 +81,8 @@ bool TargetTransformInfo::isLoweredToCal
}
void TargetTransformInfo::getUnrollingPreferences(
- const Function *F, Loop *L, UnrollingPreferences &UP) const {
- return TTIImpl->getUnrollingPreferences(F, L, UP);
+ Loop *L, UnrollingPreferences &UP) const {
+ return TTIImpl->getUnrollingPreferences(L, UP);
}
bool TargetTransformInfo::isLegalAddImmediate(int64_t Imm) const {
Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.cpp Sun Feb 1 08:31:23 2015
@@ -424,7 +424,7 @@ unsigned AArch64TTIImpl::getMaxInterleav
return 2;
}
-void AArch64TTIImpl::getUnrollingPreferences(const Function *F, Loop *L,
+void AArch64TTIImpl::getUnrollingPreferences(Loop *L,
TTI::UnrollingPreferences &UP) {
// Disable partial & runtime unrolling on -Os.
UP.PartialOptSizeThreshold = 0;
Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.h?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.h (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetTransformInfo.h Sun Feb 1 08:31:23 2015
@@ -132,8 +132,7 @@ public:
unsigned getCostOfKeepingLiveOverCall(ArrayRef<Type *> Tys);
- void getUnrollingPreferences(const Function *F, Loop *L,
- TTI::UnrollingPreferences &UP);
+ void getUnrollingPreferences(Loop *L, TTI::UnrollingPreferences &UP);
Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
Type *ExpectedType);
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.cpp?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.cpp Sun Feb 1 08:31:23 2015
@@ -181,7 +181,7 @@ unsigned PPCTTIImpl::getIntImmCost(unsig
return PPCTTIImpl::getIntImmCost(Imm, Ty);
}
-void PPCTTIImpl::getUnrollingPreferences(const Function *F, Loop *L,
+void PPCTTIImpl::getUnrollingPreferences(Loop *L,
TTI::UnrollingPreferences &UP) {
if (ST->getDarwinDirective() == PPC::DIR_A2) {
// The A2 is in-order with a deep pipeline, and concatenation unrolling
@@ -189,7 +189,7 @@ void PPCTTIImpl::getUnrollingPreferences
UP.Partial = UP.Runtime = true;
}
- BaseT::getUnrollingPreferences(F, L, UP);
+ BaseT::getUnrollingPreferences(L, UP);
}
unsigned PPCTTIImpl::getNumberOfRegisters(bool Vector) {
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.h?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.h Sun Feb 1 08:31:23 2015
@@ -71,8 +71,7 @@ public:
Type *Ty);
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth);
- void getUnrollingPreferences(const Function *F, Loop *L,
- TTI::UnrollingPreferences &UP);
+ void getUnrollingPreferences(Loop *L, TTI::UnrollingPreferences &UP);
/// @}
Modified: llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp Sun Feb 1 08:31:23 2015
@@ -27,7 +27,7 @@ using namespace llvm;
#define DEBUG_TYPE "AMDGPUtti"
-void AMDGPUTTIImpl::getUnrollingPreferences(const Function *, Loop *L,
+void AMDGPUTTIImpl::getUnrollingPreferences(Loop *L,
TTI::UnrollingPreferences &UP) {
UP.Threshold = 300; // Twice the default.
UP.Count = UINT_MAX;
Modified: llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.h?rev=227741&r1=227740&r2=227741&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.h (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.h Sun Feb 1 08:31:23 2015
@@ -61,8 +61,7 @@ public:
bool hasBranchDivergence() { return true; }
- void getUnrollingPreferences(const Function *F, Loop *L,
- TTI::UnrollingPreferences &UP);
+ void getUnrollingPreferences(Loop *L, TTI::UnrollingPreferences &UP);
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth) {
assert(isPowerOf2_32(TyWidth) && "Ty width must be power of 2");
More information about the llvm-commits
mailing list