[PATCH] D37779: Invoke GetInlineCost for legality check before inline functions in SampleProfileLoader.
Easwaran Raman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 13 14:21:05 PDT 2017
eraman accepted this revision.
eraman added a comment.
LGTM
================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:763
BasicBlock *BB = I->getParent();
- if (InlineFunction(CallSite(DI), IFI)) {
+ InlineParams Param;
+ Param.ComputeFullInlineCost = true;
----------------
Nit: I would use Params instead (or IP.)
================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:768
+ // set ComputeFullInlineCost, otherwise getInlineCost may return early
+ // when cost exceeds threshold without checking all IRs in the callee.
+ InlineCost Cost = getInlineCost(CS, Param, GetTTI(*CalledFunction), GetAC,
----------------
Extend the comment to say that the actual threshold doesn't matter since you only check for isNever.
https://reviews.llvm.org/D37779
More information about the llvm-commits
mailing list