[PATCH] D92998: [CSSPGO][llvm-profgen] Pseudo probe based CS profile generation

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 22:04:34 PST 2021


wmi added inline comments.


================
Comment at: llvm/test/tools/llvm-profgen/noinline-cs-pseudoprobe.test:13-14
+; CHECK-NEXT: 1: 15
+; CHECK-NEXT: 2: 0
+; CHECK-NEXT: 3: 0
+; CHECK-NEXT: 4: 15
----------------
In [main:2 @ foo], probes with 0 count are not dumped. In which case probe with 0 count will be dumped?


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:347-349
+      // PrefixContextId is the context id string except for the leaf probe's
+      // context, the final ContextId will be:
+      // ContextId =  PrefixContextId + LeafContextId;
----------------
Move it to header comment of extractPrefixContextId in case extractPrefixContextId is used elsewhere.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.h:139
+  FunctionSamples &
+  getFunctionProfileForLeaf(StringRef PrefixContextId,
+                            SmallVector<std::string, 16> &LeafInlinedContext,
----------------
Make it an overload function of getFunctionProfileForLeafProbe so it is known to be used for probe?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92998/new/

https://reviews.llvm.org/D92998



More information about the llvm-commits mailing list