[PATCH] D104267: [CSSPGO] Fix an invalid hash table reference issue in the CS preinliner.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 17 18:09:17 PDT 2021


hoy added inline comments.


================
Comment at: llvm/lib/ProfileData/SampleProf.cpp:395
+  for (auto &I : ProfilesToBeAdded) {
+    ProfileMap.try_emplace(I.first(), I.second);
+  }
----------------
wenlei wrote:
> With try_emplace, we're expecting some of the insertions will fail? In that case, such profile will be lost. Perhaps we still need to order the insertion so such failure will not happen. 
Good point! Didn't realize that conflict could happen. Adjusted the insertion and deletion order.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104267



More information about the llvm-commits mailing list