[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:40:13 PDT 2020


yamauchi added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:661
+    } Data;
+    Data.N = (uint64_t)SIVisitor.getNumOfSelectInsts();
+    JCH.update(Data.C);
----------------
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).


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