SSA form

Basic idea

In LLVM IR every register is assigned exactly once. To represent values that depend on which control-flow predecessor was taken, LLVM uses phi instructions at the start of basic blocks.

Key formulas

See SSA LLVM does not allow multiple assignments to registers

LLVM offers the phi function to choose between values.

Siblings