[PATCH] D127026: [CSSPGO][llvm-profgen] Reimplement computeSummaryAndThreshold using context trie
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 10 09:24:44 PDT 2022
wlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:1037
+ bool OldOpt = UseContextLessSummary;
+ UseContextLessSummary = true;
+ ContextTracker.createContextLessProfileMap(ContextLessProfiles);
----------------
hoy wrote:
> Should this be set to false? We want to avoid merging ContextLessProfiles again in computeSummaryForProfiles?
Oops, it should be false. I also found that set `UseContextLessSummary` false is not enough, I have to set FunctionSamples::ProfileIsCS to false as well, because the `UseContextLessSummary.getNumOccurrences()` is 0 here.
```
if (UseContextLessSummary || (sampleprof::FunctionSamples::ProfileIsCS &&
!UseContextLessSummary.getNumOccurrences())) {
...
```
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