[llvm] [PGO] Add `llvm.loop.estimated_trip_count` metadata (PR #148758)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 07:35:25 PDT 2025
================
@@ -869,9 +951,9 @@ bool llvm::setLoopEstimatedTripCount(Loop *L, unsigned EstimatedTripCount,
unsigned LatchExitWeight = 0;
unsigned BackedgeTakenWeight = 0;
- if (EstimatedTripCount > 0) {
- LatchExitWeight = EstimatedloopInvocationWeight;
- BackedgeTakenWeight = (EstimatedTripCount - 1) * LatchExitWeight;
+ if (*EstimatedTripCount > 0) {
----------------
mtrofin wrote:
Nit: since it's an unsigned, `*EstimatedTripCount != 0`?
https://github.com/llvm/llvm-project/pull/148758
More information about the llvm-commits
mailing list