[PATCH] D127026: [CSSPGO][llvm-profgen] Reimplement computeSummaryAndThreshold using context trie
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 9 21:37:56 PDT 2022
wlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:413
+ if (const auto *CtxKey = dyn_cast<AddrBasedCtxKey>(CI.first.getPtr())) {
+ for (auto Addr : CtxKey->Context) {
+ if (FuncRange *FRange = Binary->findFuncRangeForOffset(
----------------
Here is for all context including the non-sampling one.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:465
+
+ if (!Node->getFuncName().empty())
+ if (auto *Func = Binary->getBinaryFunction(Node->getFuncName()))
----------------
hoy wrote:
> Also check FunctionProfile is not null? A null profile means the function is likely not executed.
I think we discussed before for the non-executed context and the conclusion is to keep it? because I saw in `SampleCounters` case, it keep the function there. See above code(line 413)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127026/new/
https://reviews.llvm.org/D127026
More information about the llvm-commits
mailing list