[PATCH] D158891: [CSSPGO] Retire FlattenProfileForMatching
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 17:38:46 PDT 2023
wlei added inline comments.
================
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
----------------
wenlei wrote:
> nit: move this right before the use on line 2398?
done!
================
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.
----------------
wenlei wrote:
> 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.
Refined the comments.
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