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

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 07:45:50 PDT 2023


davidxl added inline comments.


================
Comment at: llvm/lib/ProfileData/SampleProf.cpp:403
 
-void SampleContextTrimmer::canonicalizeContextProfiles() {
-  std::vector<SampleContext> ProfilesToBeRemoved;
----------------
is this a dead function? should it be removed in a separate patch?


================
Comment at: llvm/lib/ProfileData/SampleProfReader.cpp:579
+    assert(MD5SampleContextStart == MD5SampleContextTable.data());
+    // Lazy computing of hash value, write back to the table.
+    Hash = Context.getHashCode();
----------------
add comment explaining the benefit of lazy hash computing.


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