Branch probability

14 · · Aug. 10, 2026, 5:16 a.m.
Summary
This post discusses LLVM's BranchProbabilityInfo component, which assigns probabilities to multi-successor terminators in control flow graphs (CFGs). It explains the heuristic used when no profile is available, focusing on how certain blocks affect probability distributions and the treatment of loops in this context.