[PATCH] D89723: [CSSPGO][llvm-profgen]Context-sensitive profile data generation
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 10:17:02 PST 2020
wlei marked 11 inline comments as done.
wlei added inline comments.
================
Comment at: llvm/test/tools/llvm-profgen/inline-cs-noprobe.test:27
+; original code:
+#include <stdio.h>
+
----------------
hoy wrote:
> Can you please add a comment on what compiler command line switches are used to build the source code?
Good suggestion, comment added
================
Comment at: llvm/tools/llvm-profgen/PerfReader.h:83
+ // Call stack recorded in FILO(leaf to root) order
+ std::list<uint64_t> CallStack;
+ // LBR stack recorded in FIFO order
----------------
hoy wrote:
> Nit: consider using `std::vector` to reduce the number of memory allocations and for better locality.
Here using list is because CallStack has both `push_back` and `push_front` action, in the future it will switch to trie.
================
Comment at: llvm/tools/llvm-profgen/PerfReader.h:155
+ }
+ ProfiledBinary *getBinary() { return Binary; }
+ bool hasNextLBR() { return LBRIndex < LBRStack.size(); }
----------------
hoy wrote:
> Nit: `const` qualifier for these getters?
fixed, good suggestion, thanks!
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