[llvm] [X86][ProfCheck] Synthesize profile information where relevant (PR #181578)
Joel E. Denny via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 18 09:06:47 PST 2026
jdenny-ornl wrote:
> > should the loop (IIUC it's synthesized here out of thin air) have the loop tripcount metadata, too?
>
> It shouldn't be necessary here given we do not have anything like peeling taking effect, so the branch weights directly imply the correct trip count (which `getLoopEstimatedTripCount` will return).
If the new loop's `llvm.loop.estimated_trip_count` would not diverge from its latch branch weights, then I agree it is not strictly necessary to add it.
That requires that the new loop is not derived from an existing loop, which might already have a divergent `llvm.loop.estimated_trip_count`. Based on comments, my understanding is there is no existing loop in this pass, but I have not reviewed in detail.
https://github.com/llvm/llvm-project/pull/181578
More information about the llvm-commits
mailing list