[PATCH] D136627: [SampleFDO] Compute profile mismatch metrics
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 20:46:51 PDT 2022
wenlei added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/SampleProf.h:308-309
+ size_t operator()(const LineLocation &Loc) const {
+ return std::hash<std::uint64_t>{}((((uint64_t)Loc.LineOffset) << 32) |
+ Loc.Discriminator);
+ }
----------------
It doesn't matter on our platform, but just pointing out that this code isn't portable on host target with size_t -> uint32_t, in which case, the hash becomes just Loc.Discriminator.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136627/new/
https://reviews.llvm.org/D136627
More information about the llvm-commits
mailing list