[PATCH] D23727: [Profile] SelectInst instrumentation Support in IR-PGO
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 09:14:36 PDT 2023
davidxl added inline comments.
================
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]);
----------------
qiongsiwu1 wrote:
> 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?
Such insanity may result from race condition during counter update.
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