# Block frequency

DevFeed: [Block frequency](<https://devfeed.tech/articles/block-frequency-31125.md>)

Original publisher: [Read original article](<https://maskray.me/blog/block-frequency>)

Published: 2026-08-23T07:00:00Z

Content type: article

Language: en

Sources: [MaskRay](<https://devfeed.tech/sources/maskray.md>)

Topics: [LLVM](<https://devfeed.tech/topics/llvm.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [graph](<https://devfeed.tech/tags/graph.md>), [llvm](<https://devfeed.tech/tags/llvm.md>)

## AI overview

This article explains how LLVM turns branch probabilities into per-block frequencies through linear-time propagation over loop-structured regions. It also notes that irreducible control flow reduces accuracy.

## Source excerpt

Estimating branch probabilities says how one branch splits. BlockFrequencyInfo turns those local numbers into per-block frequencies, which nearly every profitability decision in LLVM ends up reading. The core is a linear-time propagation over loop-packaged regions. Where no such structure exists -- irreducible control flow -- the accuracy goes with it.