[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
Tue Feb 19 15:20:22 PST 2019


wmi added a comment.

In D58399#1402844 <https://reviews.llvm.org/D58399#1402844>, @eraman wrote:

> One option is to call DiagnosticHandler::isMissedOptRemarkEnabled in Inliner and pass the result (bool)  when creating the CallAnalyzer object. This can be ORed with whether the missed opt remark is enabled  for inline-cost.


That is feasible. Actually I found we don't need to pass the extra bool. By checking the locations where getInlineCost is called, some of them already set RemarksEnabled and passes `RemarksEnabled ? &ORE : nullptr` to getInlineCost as its ORE argument. I did the same for inliner and partial inliner, so the assumption that "RemarksEnabled == (ORE != nullptr))" can be hold true, and we can still use the same way to set ComputeFullInlineCost.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58399/new/

https://reviews.llvm.org/D58399





More information about the llvm-commits mailing list