IT lexicon › Programming › Available expressions

Available expressions

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

The data-flow analysis that determines which expressions are guaranteed to have already been computed, with unchanged operands, on every path to a given point.

An expression like a + b is available at a point if it has been computed on every path leading there and neither a nor b has been reassigned since. If it's available, a fresh computation can be replaced by the old result, which is exactly what global common subexpression elimination needs to know. The analysis runs forward through the control-flow graph and merges paths by intersection: one path lacking the expression is enough to kill it.

It has been a textbook staple since John Cocke and Gary Kildall in the early 1970s, and it's the mirror image of liveness analysis, which runs backward and merges by union. Modern compilers rarely compute it explicitly — value numbering on SSA form gets the same answer more cheaply — but it remains the clearest explanation of why CSE sometimes refuses to fire.

← Back to the lexicon