[PATCH] D124793: [CSSPGO] Relax size limitation for priority inlining with preinlined profile
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 12:00:22 PDT 2022
hoy created this revision.
Herald added subscribers: ormris, modimo, wenlei, hiraditya.
Herald added a project: All.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
As a follow-up to D124632 <https://reviews.llvm.org/D124632>, I'm turning on unlimited size caps for inlining with preinlined profile. It should be safe as a preinlined profile has "bounded" inline contexts.
No noticeable size or perf delta was seen using two of our internal services, but I think this is still a good change to be consistent with the other case.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124793
Files:
llvm/lib/Transforms/IPO/SampleProfile.cpp
Index: llvm/lib/Transforms/IPO/SampleProfile.cpp
===================================================================
--- llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -2025,10 +2025,13 @@
if (Reader->profileIsPreInlined()) {
if (!UsePreInlinerDecision.getNumOccurrences())
UsePreInlinerDecision = true;
- } else if (!Reader->profileIsCS()) {
+ }
+
+ if (!Reader->profileIsCS()) {
// Non-CS profile should be fine without a function size budget for the
- // inliner since the contexts in the profile are all from inlining in
- // the prevoius build, thus they are bounded.
+ // inliner since the contexts in the profile are either all from inlining
+ // in the prevoius build or pre-computed by the preinliner with a size
+ // cap, thus they are bounded.
if (!ProfileInlineLimitMin.getNumOccurrences())
ProfileInlineLimitMin = std::numeric_limits<unsigned>::max();
if (!ProfileInlineLimitMax.getNumOccurrences())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124793.426475.patch
Type: text/x-patch
Size: 1042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220502/6eb7e4a9/attachment.bin>
More information about the llvm-commits
mailing list