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
This commit is contained in:
Hal Finkel
2013-09-11 19:25:43 +00:00
parent 8822f48f72
commit 4f7e2c38e8
4 changed files with 66 additions and 7 deletions

View File

@ -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.