summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/Inliner.cpp
diff options
context:
space:
mode:
authorEvgeny Astigeevich <evgeny.astigeevich@arm.com>2017-03-22 12:01:57 +0000
committerEvgeny Astigeevich <evgeny.astigeevich@arm.com>2017-03-22 12:01:57 +0000
commit7823c66e05b5878237405827611bad5ee48959f8 (patch)
tree2c9f9c1447ad0045d668b42e4327c9d550bb4649 /llvm/lib/Transforms/IPO/Inliner.cpp
parentb19a507a889cadd5e351d89a3291153f914aa83b (diff)
downloadbcm5719-llvm-7823c66e05b5878237405827611bad5ee48959f8.tar.gz
bcm5719-llvm-7823c66e05b5878237405827611bad5ee48959f8.zip
r286814 resulted that CallPenalty can be subtracted twice:
- First time, during calculation of the cost in InlineCost.cpp - Second time, during calculation of the cost in Inliner.cpp This patches fixes this. Differential Revision: https://reviews.llvm.org/D31137 llvm-svn: 298496
Diffstat (limited to 'llvm/lib/Transforms/IPO/Inliner.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 31589ac99ee..6c83c99ae3b 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -289,7 +289,7 @@ shouldBeDeferred(Function *Caller, CallSite CS, InlineCost IC,
// treating them as truly abstract units etc.
TotalSecondaryCost = 0;
// The candidate cost to be imposed upon the current function.
- int CandidateCost = IC.getCost() - (InlineConstants::CallPenalty + 1);
+ int CandidateCost = IC.getCost() - 1;
// This bool tracks what happens if we do NOT inline C into B.
bool callerWillBeRemoved = Caller->hasLocalLinkage();
// This bool tracks what happens if we DO inline C into B.
OpenPOWER on IntegriCloud