IT lexicon › Programming › Reaching definitions

Reaching definitions

Programming På svenska → Updated: 2026-11-05

The textbook data-flow analysis that works out, for every point in a program, which assignments might have produced the values the variables currently hold.

A definition of x reaches a point if some path leads there without x being overwritten along the way. The analysis runs forward over the control-flow graph. Each basic block generates its own assignments and kills every other definition of the same variable, and where paths join the sets are unioned — one possible route is enough. With one bit per definition the whole thing reduces to bit-vector operations, which made it affordable on 1970s hardware.

The results feed use-def chains, constant propagation and the warning that a variable may be used uninitialized: if an empty definition reaches a read, the compiler has something to complain about. In SSA form the analysis is nearly free, because every use has exactly one definition by construction. That is a large part of why modern compilers switched.

← Back to the lexicon