[PATCH] D120784: [CSSPGO][PriorityInliner] Do not use block weight to drive callsite inlining.
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 16:36:40 PST 2022
hoy added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1309
+ uint64_t CallsiteCount =
+ CalleeSamples ? CalleeSamples->getEntrySamples() * Factor : 0;
*NewCandidate = {CB, CalleeSamples, CallsiteCount, Factor};
----------------
hoy wrote:
> wenlei wrote:
> > When we don't have callee samples, should we fall back to call site block counts?
> >
> > In reality we would also need to tolerate some source change, i.e. the call site didn't exist in pass1 build.
> If the callsite doesn't exist in pass1, the caller profile will probably be discarded due to checksum mismatch. So here when callee sample is missing, it's likely that the callsite is cold in this particular context. Using block count might end up treating it as hot.
Interesting point on tolerating source changes. That would require some changes to probe numbering. So far we number callsite probes sequentially which is easily broken with a new callsite introduced. We might somehow need to keep this numbering stable across builds.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120784/new/
https://reviews.llvm.org/D120784
More information about the llvm-commits
mailing list