[PATCH] D61540: [PGO] Use sum of count values to fix func entry count and add a check to verify BFI counts

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 13:48:57 PST 2020


davidxl added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1657
+  uint64_t FuncEntryCount = Func.getBBInfo(&*F.begin()).CountValue;
+  uint64_t NewEntryCount = 0.5 + FuncEntryCount * Scale;
+  if (NewEntryCount == 0)
----------------
Perhaps take the max of the original func entry count and the new entry count?


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

https://reviews.llvm.org/D61540



More information about the llvm-commits mailing list