[PATCH] D121862: [ProfSampleLoader] When disable-sample-loader-inlining is true, merge profiles of inlined instances to outlining versions.
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 16:29:04 PDT 2022
wenlei accepted this revision.
wenlei added a comment.
This revision is now accepted and ready to land.
lgtm with some nits.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:188-194
+ cl::desc("If true, artifically skip inline transformation in sample-loader "
+ "pass, and merge (or scale) profiles (as configured by "
+ "--sample-profile-merge-inlinee). "
+ "Since profiles are consumed by many passes, turning on this "
+ "option has side effects."
+ "For instance, pre-link SCC inliner would see merged profiles and "
+ "inline the hot functions (that are skipped in this pass)."));
----------------
This seems too verbose - it's the longest message among all flags here. But I don't have a strong opinion.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:196
+
+// D121862
cl::opt<int> ProfileInlineGrowthLimit(
----------------
remove
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1511-1512
Candidate.CallsiteDistribution};
+ // Do not attempt to promote and inline candidate if
+ // --disable-sample-loader-inlining is true.
if (tryPromoteAndInlineCandidate(F, Candidate, SumOrigin, Sum,
----------------
Remove this comment as well.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1528
SmallVector<CallBase *, 8> InlinedCallSites;
+
if (tryInlineCandidate(Candidate, &InlinedCallSites)) {
----------------
nit: remove this white space line and avoid unrelated changes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121862/new/
https://reviews.llvm.org/D121862
More information about the llvm-commits
mailing list