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

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 14:38:04 PDT 2020


MaskRay added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:623
 // Compute Hash value for the CFG: the lower 32 bits are CRC32 of the index
-// value of each BB in the CFG. The higher 32 bits record the number of edges.
+// value of each BB in the CFG. The higher 32 bits are the CR32 of the numbers
+// of selects, indirect calls, mem ops and edges.
----------------
To make sure I understand: we use two CRCs instead of one CRC because we want to extract low/high 32 bits for debugging purposes?

Otherwise, we can just use one CRC.


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