aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/InlineSimple.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/InlineSimple.cpp15
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;