From 8650a4da93344eb7ed2342a46b2808f44f206507 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Fri, 15 Apr 2016 01:38:48 +0000 Subject: [TTI] Add getInliningThresholdMultiplier. Summary: InlineCost's threshold is multiplied by this value. This lets us adjust the inlining threshold up or down on a per-target basis. For example, we might want to increase the threshold on targets where calls are unusually expensive. Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18560 llvm-svn: 266405 --- llvm/lib/Analysis/TargetTransformInfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Analysis/TargetTransformInfo.cpp') diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp index 9b23d7ca932..c8f116a1d33 100644 --- a/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/llvm/lib/Analysis/TargetTransformInfo.cpp @@ -66,6 +66,10 @@ int TargetTransformInfo::getCallCost(const Function *F, return Cost; } +unsigned TargetTransformInfo::getInliningThresholdMultiplier() const { + return TTIImpl->getInliningThresholdMultiplier(); +} + int TargetTransformInfo::getIntrinsicCost( Intrinsic::ID IID, Type *RetTy, ArrayRef Arguments) const { int Cost = TTIImpl->getIntrinsicCost(IID, RetTy, Arguments); -- cgit v1.2.3