[PATCH] D84782: [PGO] Include the mem ops into the function hash.
Hiroshi Yamauchi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 29 16:46:27 PDT 2020
yamauchi added a comment.
Here's the diff in the latest update:
< + union {
< + uint64_t N;
< + uint8_t C[8];
< + } Data;
< + Data.N = (uint64_t)SIVisitor.getNumOfSelectInsts();
< + JCH.update(Data.C);
< + Data.N = (uint64_t)ValueSites[IPVK_IndirectCallTarget].size();
< + JCH.update(Data.C);
< + Data.N = (uint64_t)ValueSites[IPVK_MemOPSize].size();
< + JCH.update(Data.C);
< + Data.N = (uint64_t)MST.AllEdges.size();
< + JCH.update(Data.C);
---
> + auto updateJCH = [&JCH](uint64_t Num) {
> + std::vector<uint8_t> Data;
> + for (unsigned I = 0; I < 8; ++I)
> + Data.push_back((uint8_t)(Num >> (I * 8)));
> + JCH.update(Data);
> + };
> + updateJCH((uint64_t)SIVisitor.getNumOfSelectInsts());
> + updateJCH((uint64_t)ValueSites[IPVK_IndirectCallTarget].size());
> + updateJCH((uint64_t)ValueSites[IPVK_MemOPSize].size());
> + updateJCH((uint64_t)MST.AllEdges.size());
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84782/new/
https://reviews.llvm.org/D84782
More information about the cfe-commits
mailing list