[PATCH] D127026: [CSSPGO][llvm-profgen] Reimplement computeSummaryAndThreshold using context trie

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 21:56:19 PDT 2022


hoy added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:465
+
+      if (!Node->getFuncName().empty())
+        if (auto *Func = Binary->getBinaryFunction(Node->getFuncName()))
----------------
wlei wrote:
> 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)
Oh right, functions only showing up in stack samples should be considered as profiled. Actually there was a bug on the ProfileMap path and now your change is fixing it. LGTM.


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