[PATCH] D92334: [CSSPGO][llvm-profgen] Pseudo probe decoding and disassembling
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 4 10:57:06 PST 2020
hoy added inline comments.
================
Comment at: llvm/tools/llvm-profgen/PseudoProbe.h:41
+// Use func GUID and index as the location info of the inline site
+struct InlineSite {
+ uint64_t GUID = 0;
----------------
wlei wrote:
> hoy wrote:
> > May just use `std::pair' which has predefined hash and equal operators?
> Seems `std::pair` only support std::map predefine comparator, has to define the hash operator for unordered_map,
> so it will be like:
>
> ```
> using InlineSite = std::pair<uint64_t, uint64_t>;
> struct InlineSiteHash {
> uint64_t operator()(const InlineSite &Site) const {
> return Site.first^ Site.second;
> }
> };
> std::unordered_map<InlineSite, std::unique_ptr<PseudoProbeInlineTree>,
> InlineSiteHash> Children;
>
> ```
> is that what you think?
yeah, and perhaps `InlineSiteHash` is not needed.
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