summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-08-29 03:29:57 +0000
committerHal Finkel <hfinkel@anl.gov>2013-08-29 03:29:57 +0000
commit63e6c0e9fb956f70b5e862fb2e0c241c1ae31bb0 (patch)
treec5304da5b508e351c2127e8bf19baf7a505a5cb3 /llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
parent5ef4dccdce9da7c39455739fd2fc2c96b825504c (diff)
downloadbcm5719-llvm-63e6c0e9fb956f70b5e862fb2e0c241c1ae31bb0.tar.gz
bcm5719-llvm-63e6c0e9fb956f70b5e862fb2e0c241c1ae31bb0.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: 189565
Diffstat (limited to 'llvm/lib/CodeGen/BasicTargetTransformInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/BasicTargetTransformInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
index d5340e60231..e1380b73e9e 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 bool getUnrollingPreferences(UnrollingPreferences &UP) const;
/// @}
@@ -189,6 +190,10 @@ bool BasicTTI::haveFastSqrt(Type *Ty) const {
return TLI->isTypeLegal(VT) && TLI->isOperationLegalOrCustom(ISD::FSQRT, VT);
}
+bool BasicTTI::getUnrollingPreferences(UnrollingPreferences &) const {
+ return false;
+}
+
//===----------------------------------------------------------------------===//
//
// Calls used by the vectorizers.
OpenPOWER on IntegriCloud