[PATCH] D89723: [CSSPGO][llvm-profgen]Context-sensitive profile data generation

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 01:06:24 PDT 2020


wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/PerfReader.h:90
+  // TODO: switch to use trie for call stack
+  std::list<uint64_t> CallStack;
+  // Used to fall through the LBR stack
----------------
wenlei wrote:
> wlei wrote:
> > wenlei wrote:
> > > Can this be a reference as well just like `LBRStack` and point to the input Sample? Note header comment also states "it doesn't hold the data but only keep the pointer/index of the data".
> > Same here, there is pop_front() with CallStack so that I used list. This will be solved by trie. The comments is the final ideal one..sorry for the confusing.
> I see. So because Trace is the key of TraceAggregationMap and we will need to mutate this list, you have to create a copy of what's in UnwindTrace, correct?
Yes, the map key enforces the const type and it at least copy one to the State even using trie node( for the tie initialization) because of the mutation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89723



More information about the llvm-commits mailing list