[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
Wed Jun 14 15:08:58 PDT 2023


huangjd updated this revision to Diff 531529.
huangjd added a comment.

Use hash_code for SampleContext.getHashValue() so that DenseMap does not hash the MD5 again inside the map (uint64_t get hashed again which is unnecessary here because MD5 is sufficiently sparse)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147740

Files:
  llvm/include/llvm/ProfileData/SampleProf.h
  llvm/include/llvm/ProfileData/SampleProfReader.h
  llvm/lib/ProfileData/ProfileSummaryBuilder.cpp
  llvm/lib/ProfileData/SampleProf.cpp
  llvm/lib/ProfileData/SampleProfReader.cpp
  llvm/lib/ProfileData/SampleProfWriter.cpp
  llvm/lib/Transforms/IPO/SampleContextTracker.cpp
  llvm/test/tools/llvm-profdata/Inputs/sample-nametable-after-samples.profdata
  llvm/test/tools/llvm-profdata/sample-nametable.test
  llvm/tools/llvm-profdata/llvm-profdata.cpp
  llvm/tools/llvm-profgen/ProfileGenerator.cpp
  llvm/unittests/tools/llvm-profdata/CMakeLists.txt
  llvm/unittests/tools/llvm-profdata/MD5CollisionTest.cpp
  llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147740.531529.patch
Type: text/x-patch
Size: 42934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230614/f8c0c77b/attachment.bin>


More information about the llvm-commits mailing list