[llvm] [PGO] Fix zeroed estimated trip count (PR #167792)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 20:07:59 PST 2025
================
@@ -912,12 +912,14 @@ llvm::getLoopEstimatedTripCount(Loop *L,
}
// Return the estimated trip count from metadata unless the metadata is
- // missing or has no value.
+ // missing or has no value. Return std::nullopt if it's zero.
----------------
mtrofin wrote:
nit: can you expand why (because it's naively counter-intuitive. I'd just copy and paste the .rst text.)
https://github.com/llvm/llvm-project/pull/167792
More information about the llvm-commits
mailing list