[PATCH] D95024: [NFC] Factor out common part for CSSPGO inline and AFDO inline
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 00:12:36 PST 2021
wenlei added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1406
if (!CallsitePrioritizedInline) {
- if (Cost.isNever())
- return Cost;
- return InlineCost::getAlways("hot callsite previously inlined");
+ return InlineCost::get(Cost.getCost(), INT_MAX);
}
----------------
In the old AFDO inliner, cost-benefit check is done earlier, so at this point we would skip inlining only if cost is never. When the cost is not never, the cost is only used in remarks. I figured a remark with positive inlining and cost > threshold in the message can be confusing, so I tweak the threshold here. This is why I had to update the test case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95024/new/
https://reviews.llvm.org/D95024
More information about the llvm-commits
mailing list