[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
Thu May 25 12:34:43 PDT 2023
davidxl added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/SampleProfReader.h:415
+ uint64_t MD5 = MD5Hash(CanonName);
+ auto Ret = Profiles.try_emplace(MD5, FunctionSamples());
+ if (!Ret.second) {
----------------
huangjd wrote:
> davidxl wrote:
> > Why not using the new interface SampleProfileMapTryEmplace?
> This is one of the exception case because of the additional processing at line 425. This function intends to succeed even if a collision happens
You can add an extra parameter : insert_on_conflict (default to false).
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