aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit32f258b96a723b771eb44a2c0689b8bf4dd871ee (patch)
tree0a48bd05ecababcbe58e27cdd0dd15ab16c6f1f4 /lib/CodeGen/BasicTargetTransformInfo.cpp
parent253acef7a5ea2fbba7848d2257ae3cce2ea02ce0 (diff)
downloadexternal_llvm-32f258b96a723b771eb44a2c0689b8bf4dd871ee.zip
external_llvm-32f258b96a723b771eb44a2c0689b8bf4dd871ee.tar.gz
external_llvm-32f258b96a723b771eb44a2c0689b8bf4dd871ee.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@189565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BasicTargetTransformInfo.cpp')
-rw-r--r--lib/CodeGen/BasicTargetTransformInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/BasicTargetTransformInfo.cpp b/lib/CodeGen/BasicTargetTransformInfo.cpp
index d5340e6..e1380b7 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 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.