[PATCH] D158891: [CSSPGO] Retire FlattenProfileForMatching
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 14:24:32 PDT 2023
wenlei accepted this revision.
wenlei added a comment.
This revision is now accepted and ready to land.
lgtm except nits, thanks.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2379
+void SampleProfileMatcher::runOnFunction(const Function &F) {
+ const auto *FS = Reader.getSamplesFor(F);
+ // Use flattened function samples to populate profile locations as function
----------------
nit: move this right before the use on line 2398?
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2380-2382
+ // Use flattened function samples to populate profile locations as function
+ // samples under different context may have different callsites, so merge them
+ // together for the matching.
----------------
nit: it may be useful to emphasize the benefit of use flattened profile for matching, i.e. it's not an arbitrary choice, but we actually see benefit from doing that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158891/new/
https://reviews.llvm.org/D158891
More information about the llvm-commits
mailing list