[llvm] [PGO] Don't unconditionally request BBInfo in verifyFuncBFI() (PR #140804)
Ellis Hoag via llvm-commits
llvm-commits at lists.llvm.org
Tue May 20 17:45:08 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;
- CountValue = Func.getBBInfo(&BBI).Count.value_or(CountValue);
+ uint64_t CountValue = Func.getBBInfo(&BBI).Count.value_or(CountValue);
----------------
ellishg wrote:
```suggestion
uint64_t CountValue = BBInfo->Count.value_or(CountValue);
```
https://github.com/llvm/llvm-project/pull/140804
More information about the llvm-commits
mailing list