From 63e6c0e9fb956f70b5e862fb2e0c241c1ae31bb0 Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Thu, 29 Aug 2013 03:29:57 +0000 Subject: 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 --- llvm/lib/CodeGen/BasicTargetTransformInfo.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/CodeGen') 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. -- cgit v1.2.3