[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 17:18:22 PDT 2020
yamauchi added a comment.
Latest update diff:
< + std::vector<uint8_t> Data;
< + for (unsigned I = 0; I < 8; ++I)
< + Data.push_back((uint8_t)(Num >> (I * 8)));
---
> + uint8_t Data[8];
> + support::endian::write64le(Data, Num);
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:661
+ } Data;
+ Data.N = (uint64_t)SIVisitor.getNumOfSelectInsts();
+ JCH.update(Data.C);
----------------
yamauchi wrote:
> MaskRay wrote:
> > MaskRay wrote:
> > > `#include "llvm/Support/Endian.h"`
> > >
> > > and use `support::endian::write64le(&Data.N, (uint64_t)SIVisitor.getNumOfSelectInsts())`
> > Sorry, just use a plain `uint8_t C[8];` and `support::endian::write64le(C, (uint64_t)SIVisitor.getNumOfSelectInsts())`
> I went for the same style (using a vector) as the above code (line 642).
Now uses write64le.
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