aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit4f7e2c38e864d7eaeb407ac501478e9579624d1b (patch)
treea795fc243082f1ed166655d8c124d3509e5cddf1 /lib/CodeGen/BasicTargetTransformInfo.cpp
parent8822f48f72f5b0ed8a265d535dc146d1ebef721f (diff)
downloadexternal_llvm-4f7e2c38e864d7eaeb407ac501478e9579624d1b.zip
external_llvm-4f7e2c38e864d7eaeb407ac501478e9579624d1b.tar.gz
external_llvm-4f7e2c38e864d7eaeb407ac501478e9579624d1b.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BasicTargetTransformInfo.cpp')
-rw-r--r--lib/CodeGen/BasicTargetTransformInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/BasicTargetTransformInfo.cpp b/lib/CodeGen/BasicTargetTransformInfo.cpp
index d5340e6..9c4b49a 100644
--- a/lib/CodeGen/BasicTargetTransformInfo.cpp
+++ b/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.