[PATCH] D84782: [PGO] Include the mem ops into the function hash.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 15:34:56 PDT 2020


MaskRay 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:
> `#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())`


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