[PATCH] D92334: [CSSPGO][llvm-profgen] Pseudo probe decoding and disassembling
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 15:36:28 PST 2020
wlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/PseudoProbe.h:127
+ // \p ContextStack is populated in root to leaf order
+ void getInlineContext(std::list<std::string> &ContextStack,
+ GUIDProbeFunctionMap &GUID2FuncMAP, bool ShowName);
----------------
hoy wrote:
> Nit: consider using `SmallVector` for fewer allocations and better locality.
Thanks for your suggestions. I intend to use `std::list` here to use `push_front()` to avoid some string reversion.
Because our input is the tree leaf, need to travel backwards to extract the context.
e.g. we have two probes, each has inlined context, like foo (main -> foo) and baz (bar -> baz)
we first process `foo`, extract the context: "main @ foo", "main" is pushed front of the context.
then we process` baz`, extract the context: "bar @ baz", at last putting them together will get the full context "main @ foo @ bar @ baz".
================
Comment at: llvm/tools/llvm-profgen/PseudoProbe.h:27
+// Pseudo probe type
+enum PseudoProbeType {
+ BLOCK = 0,
----------------
hoy wrote:
> Some parts of this file can be merged with `llvm/include/llvm/IR/PseudoProbe.h`. Consider moving non-decoding-specific stuff into the common header?
After the encoding patches committed, I will do the rebase and merge other parts, like `PseudoProbeAttributes`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92334/new/
https://reviews.llvm.org/D92334
More information about the llvm-commits
mailing list