diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/IPO/Inliner.cpp | 2 | 
2 files changed, 2 insertions, 2 deletions
| diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index dd9174c0bcd..c0ac6c86ce9 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -1257,7 +1257,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) {    bool OnlyOneCallAndLocalLinkage =        F.hasLocalLinkage() && F.hasOneUse() && &F == CS.getCalledFunction();    if (OnlyOneCallAndLocalLinkage) -    Cost += InlineConstants::LastCallToStaticBonus; +    Cost -= InlineConstants::LastCallToStaticBonus;    // If this function uses the coldcc calling convention, prefer not to inline    // it. diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index c814b01750d..ab274878110 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -312,7 +312,7 @@ shouldBeDeferred(Function *Caller, CallSite CS, InlineCost IC,    // be removed entirely.  We did not account for this above unless there    // is only one caller of Caller.    if (callerWillBeRemoved && !Caller->use_empty()) -    TotalSecondaryCost += InlineConstants::LastCallToStaticBonus; +    TotalSecondaryCost -= InlineConstants::LastCallToStaticBonus;    if (inliningPreventsSomeOuterInline && TotalSecondaryCost < IC.getCost())      return true; | 

