[llvm] [PGO] Don't unconditionally request BBInfo in verifyFuncBFI() (PR #140804)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed May 21 10:25:59 PDT 2025


================
@@ -2086,10 +2086,12 @@ static void verifyFuncBFI(PGOUseFunc &Func, LoopInfo &LI,
 
   unsigned BBNum = 0, BBMisMatchNum = 0, NonZeroBBNum = 0;
   for (auto &BBI : F) {
-    uint64_t CountValue = 0;
-    uint64_t BFICountValue = 0;
+    PGOUseBBInfo *BBInfo = Func.findBBInfo(&BBI);
+    if (!BBInfo)
+      continue;
----------------
aeubanks wrote:

only unreachable basic blocks don't have a `BBInfo`, those shouldn't matter

https://github.com/llvm/llvm-project/pull/140804


More information about the llvm-commits mailing list