[PATCH] D58399: [Inliner] Don't initialize ComputeFullInlineCost to be always true because of ORE
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 20 18:58:47 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL354542: [Inliner] Pass nullptr for the ORE param of getInlineCost if RemarkEnabled (authored by wmi, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D58399?vs=187491&id=187716#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58399/new/
https://reviews.llvm.org/D58399
Files:
llvm/trunk/lib/Transforms/IPO/Inliner.cpp
llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp
Index: llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp
+++ llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp
@@ -772,8 +772,12 @@
Function *Caller = CS.getCaller();
auto &CalleeTTI = (*GetTTI)(*Callee);
- InlineCost IC = getInlineCost(CS, getInlineParams(), CalleeTTI,
- *GetAssumptionCache, GetBFI, PSI, &ORE);
+ bool RemarksEnabled =
+ Callee->getContext().getDiagHandlerPtr()->isMissedOptRemarkEnabled(
+ DEBUG_TYPE);
+ InlineCost IC =
+ getInlineCost(CS, getInlineParams(), CalleeTTI, *GetAssumptionCache,
+ GetBFI, PSI, RemarksEnabled ? &ORE : nullptr);
if (IC.isAlways()) {
ORE.emit([&]() {
Index: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/Inliner.cpp
+++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp
@@ -1005,8 +1005,11 @@
auto GetInlineCost = [&](CallSite CS) {
Function &Callee = *CS.getCalledFunction();
auto &CalleeTTI = FAM.getResult<TargetIRAnalysis>(Callee);
+ bool RemarksEnabled =
+ Callee.getContext().getDiagHandlerPtr()->isMissedOptRemarkEnabled(
+ DEBUG_TYPE);
return getInlineCost(CS, Params, CalleeTTI, GetAssumptionCache, {GetBFI},
- PSI, &ORE);
+ PSI, RemarksEnabled ? &ORE : nullptr);
};
// Now process as many calls as we have within this caller in the sequnece.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58399.187716.patch
Type: text/x-patch
Size: 1619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190221/9f5f3396/attachment.bin>
More information about the llvm-commits
mailing list