summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-09-11 19:25:43 +0000
committerHal Finkel <hfinkel@anl.gov>2013-09-11 19:25:43 +0000
commit8f2e700522b9ad339cf4ee57363d2bad39297919 (patch)
treec72ac1da320c362a85469b47ce59bc79677fda97 /llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
parent4c3b514da0784bf341eb50dd2b376939ca42b682 (diff)
downloadbcm5719-llvm-8f2e700522b9ad339cf4ee57363d2bad39297919.tar.gz
bcm5719-llvm-8f2e700522b9ad339cf4ee57363d2bad39297919.zip
Add getUnrollingPreferences to TTI
Allow targets to customize the default behavior of the generic loop unrolling transformation. This will be used by the PowerPC backend when targeting the A2 core (which is in-order with a deep pipeline), and using more aggressive defaults is important. llvm-svn: 190542
Diffstat (limited to 'llvm/lib/CodeGen/BasicTargetTransformInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/BasicTargetTransformInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
index d5340e60231..9c4b49aa7c3 100644
--- a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
+++ b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
@@ -84,6 +84,7 @@ public:
virtual unsigned getJumpBufSize() const;
virtual bool shouldBuildLookupTables() const;
virtual bool haveFastSqrt(Type *Ty) const;
+ virtual void getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) const;
/// @}
@@ -189,6 +190,8 @@ bool BasicTTI::haveFastSqrt(Type *Ty) const {
return TLI->isTypeLegal(VT) && TLI->isOperationLegalOrCustom(ISD::FSQRT, VT);
}
+void BasicTTI::getUnrollingPreferences(Loop *, UnrollingPreferences &) const { }
+
//===----------------------------------------------------------------------===//
//
// Calls used by the vectorizers.
OpenPOWER on IntegriCloud