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

Hiroshi Yamauchi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 14:50:52 PDT 2020


yamauchi added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:660
   // information.
-  FunctionHash = (uint64_t)SIVisitor.getNumOfSelectInsts() << 56 |
-                 (uint64_t)ValueSites[IPVK_IndirectCallTarget].size() << 48 |
-                 //(uint64_t)ValueSites[IPVK_MemOPSize].size() << 40 |
-                 (uint64_t)MST.AllEdges.size() << 32 | JC.getCRC();
+  FunctionHash = ((uint64_t)JCH.getCRC()) << 32 | JC.getCRC();
+
----------------
Actually I think it'd be better to shift by 28 here rather than throwing out the top 4 bits for reservation. Also, adding would be better than or'ing. Will update.


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