summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/TargetTransformInfo.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-04-15 01:38:48 +0000
committerJustin Lebar <jlebar@google.com>2016-04-15 01:38:48 +0000
commit8650a4da93344eb7ed2342a46b2808f44f206507 (patch)
treed07e0009f3cb7b0f002cc7c803aa88757dcdbeb3 /llvm/lib/Analysis/TargetTransformInfo.cpp
parent7dba2e0d0ca2bb0fec1e8c9a3f718e580a9501cb (diff)
downloadbcm5719-llvm-8650a4da93344eb7ed2342a46b2808f44f206507.tar.gz
bcm5719-llvm-8650a4da93344eb7ed2342a46b2808f44f206507.zip
[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
Diffstat (limited to 'llvm/lib/Analysis/TargetTransformInfo.cpp')
-rw-r--r--llvm/lib/Analysis/TargetTransformInfo.cpp4
1 files changed, 4 insertions, 0 deletions
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<const Value *> Arguments) const {
int Cost = TTIImpl->getIntrinsicCost(IID, RetTy, Arguments);
OpenPOWER on IntegriCloud