[PATCH] D96811: [CSSPGO][llvm-profgen] Change sample count of dangling probe in llvm-profgen

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 10:13:24 PST 2021


hoy added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:501
+    if (Probe->isDangling()) {
+      FunctionProfile.addBodySamples(Probe->Index, 0, UINT64_MAX);
+      continue;
----------------
Actually I `UINT64_MAX` may cause overflow to total samples. Even if it doesn't, profile merge may overflow too. That's one of the reasons we were using 0 as a special count. @wmi What do you think about keeping using 0?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96811



More information about the llvm-commits mailing list