[PATCH] D147740: [llvm-profdata] Refactoring Sample Profile Reader to increase FDO build speed using MD5 as key to Sample Profile map

William Junda Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 15:57:40 PDT 2023


huangjd added inline comments.


================
Comment at: llvm/test/tools/llvm-profdata/sample-nametable.test:11
 RUN: llvm-profdata merge --sample --text %p/Inputs/sample-nametable-after-samples.profdata | FileCheck %s
-CHECK: 18446744073709551615:2:9
+CHECK: 18446744073709551613:2:9
 
----------------
Note: 0xFFFFFFFFFFFFFFFF and 0xFFFFFFFFFFFFFFFE are reserved in llvm::DenseMap and cannot be used as key. Changing it to 0xFFFFFFFFFFFFFFFD.  I am not adding a check in SampleProfileMap to check for them because the assumption that a hash value is never equal them is made in so many places throughout LLVM, any check should be done inside DenseMap if actually needed. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147740/new/

https://reviews.llvm.org/D147740



More information about the llvm-commits mailing list