[PATCH] D23727: [Profile] SelectInst instrumentation Support in IR-PGO

Qiongsi Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 2 09:01:53 PDT 2023


qiongsiwu1 added inline comments.
Herald added subscribers: wlei, wenlei, jdoerfert.
Herald added projects: LLVM, All.


================
Comment at: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:968
+  // False Count
+  SCounts[1] = (TotalCount > SCounts[0] ? TotalCount - SCounts[0] : 0);
+  uint64_t MaxCount = std::max(SCounts[0], SCounts[1]);
----------------
In what scenario is it possible that the true count is bigger than the total count? My understanding is that the condition cannot be true more often than the number of times the block is executed. Do we have a wrong profile if the true count is bigger than the total count?  


Repository:
  rL LLVM

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

https://reviews.llvm.org/D23727



More information about the llvm-commits mailing list