diff options
author | Kirill Naumov <knaumov@azul.com> | 2020-06-17 14:02:34 +0000 |
---|---|---|
committer | Kirill Naumov <knaumov@azul.com> | 2020-06-17 14:02:34 +0000 |
commit | ea844c75207a9e809ccfc0922f436f972e5d5a7a (patch) | |
tree | f9d8810f1992185ec24861909a8dcae6cfa56631 /llvm/lib/Analysis/InlineCost.cpp | |
parent | dcf2a9f2ee3a730d603d69f9fbc96fdd64a744ca (diff) | |
download | llvm-ea844c75207a9e809ccfc0922f436f972e5d5a7a.zip llvm-ea844c75207a9e809ccfc0922f436f972e5d5a7a.tar.gz llvm-ea844c75207a9e809ccfc0922f436f972e5d5a7a.tar.bz2 |
Revert "[InlineCost] InlineCostAnnotationWriterPass introduced"
This reverts commit 37e06e8f5c6ee39a1d7cbaf7d5f5a3ebfa1b4e15.
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index fd4e7c7..ba327ca 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -2509,40 +2509,3 @@ InlineParams llvm::getInlineParams(unsigned OptLevel, unsigned SizeOptLevel) { Params.LocallyHotCallSiteThreshold = LocallyHotCallSiteThreshold; return Params; } - -PreservedAnalyses -InlineCostAnnotationPrinterPass::run(Function &F, - FunctionAnalysisManager &FAM) { - PrintInstructionComments = true; - std::function<AssumptionCache &(Function &)> GetAssumptionCache = [&]( - Function &F) -> AssumptionCache & { - return FAM.getResult<AssumptionAnalysis>(F); - }; - Module *M = F.getParent(); - ProfileSummaryInfo PSI(*M); - DataLayout DL(M); - TargetTransformInfo TTI(DL); - // FIXME: Redesign the usage of InlineParams to expand the scope of this pass. - // In the current implementation, the type of InlineParams doesn't matter as - // the pass serves only for verification of inliner's decisions. - // We can add a flag which determines InlineParams for this run. Right now, - // the default InlineParams are used. - const InlineParams Params = llvm::getInlineParams(); - for (BasicBlock &BB : F) { - for (Instruction &I : BB) { - if (CallInst *CI = dyn_cast<CallInst>(&I)) { - Function *CalledFunction = CI->getCalledFunction(); - if (!CalledFunction || CalledFunction->isDeclaration()) - continue; - OptimizationRemarkEmitter ORE(CalledFunction); - InlineCostCallAnalyzer ICCA(*CalledFunction, *CI, Params, TTI, - GetAssumptionCache, nullptr, &PSI, &ORE); - ICCA.analyze(); - OS << " Analyzing call of " << CalledFunction->getName() - << "... (caller:" << CI->getCaller()->getName() << ")\n"; - ICCA.dump(); - } - } - } - return PreservedAnalyses::all(); -}
\ No newline at end of file |