[PATCH] D110465: [llvm-profgen] On-demand symbolization
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 26 20:46:29 PDT 2021
wenlei accepted this revision.
wenlei added a comment.
lgtm, thanks.
================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.h:174
+ // Offset to instruction size map. Also used for quick offset lookup.
+ std::unordered_map<uint64_t, uint64_t> Offset2InstSizeMap;
+
----------------
wlei wrote:
> wenlei wrote:
> > We don't seem to use the size (value of the map)?
> Oh, it's used in the next diff of preinliner optimization, tried to make a shortcut :)
ok, thanks for clarification.
================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.h:338
+ InstructionPointer IP(this, Offset);
+ Offset2LocStackMap[Offset] = symbolize(IP, true, usePseudoProbes);
+ }
----------------
nit: emplace? Also see if we can save a lookup by following how such caching is handled in SampleProfileLoader::findFunctionSamples.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110465/new/
https://reviews.llvm.org/D110465
More information about the llvm-commits
mailing list