diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/Transforms/IPO/InlineSimple.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/InlineSimple.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp index e818743544e6..76f1d0c54d08 100644 --- a/llvm/lib/Transforms/IPO/InlineSimple.cpp +++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp @@ -15,7 +15,6 @@ #include "llvm/Analysis/ProfileSummaryInfo.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/TargetTransformInfo.h" -#include "llvm/IR/CallSite.h" #include "llvm/IR/CallingConv.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Instructions.h" @@ -52,26 +51,26 @@ public: static char ID; // Pass identification, replacement for typeid - InlineCost getInlineCost(CallSite CS) override { - Function *Callee = CS.getCalledFunction(); + InlineCost getInlineCost(CallBase &CB) override { + Function *Callee = CB.getCalledFunction(); TargetTransformInfo &TTI = TTIWP->getTTI(*Callee); bool RemarksEnabled = false; - const auto &BBs = CS.getCaller()->getBasicBlockList(); + const auto &BBs = CB.getCaller()->getBasicBlockList(); if (!BBs.empty()) { auto DI = OptimizationRemark(DEBUG_TYPE, "", DebugLoc(), &BBs.front()); if (DI.isEnabled()) RemarksEnabled = true; } - OptimizationRemarkEmitter ORE(CS.getCaller()); + OptimizationRemarkEmitter ORE(CB.getCaller()); std::function<AssumptionCache &(Function &)> GetAssumptionCache = [&](Function &F) -> AssumptionCache & { return ACT->getAssumptionCache(F); }; - return llvm::getInlineCost( - cast<CallBase>(*CS.getInstruction()), Params, TTI, GetAssumptionCache, - /*GetBFI=*/None, PSI, RemarksEnabled ? &ORE : nullptr); + return llvm::getInlineCost(CB, Params, TTI, GetAssumptionCache, GetTLI, + /*GetBFI=*/nullptr, PSI, + RemarksEnabled ? &ORE : nullptr); } bool runOnSCC(CallGraphSCC &SCC) override; |