LLVM (source code)
= LLVM
{c}
{wiki}
<LLVM> is a collection of reusable <compiler> infrastructure built around a typed <intermediate representation>. Its <static single-assignment form> gives each register-like value one definition, making data dependencies explicit for <compiler optimization>. The same <intermediate representation> has an in-memory form, a compact bitcode form and a readable textual form.<LLVM Language Reference Manual>[Abstract, Introduction and Well-Formedness]{ref}
A <compiler front end> translates a source <programming language> into the <intermediate representation>; optimization passes transform it while preserving the required semantics; a <compiler back end> produces code for a target <computer architecture>. Sharing the middle stages lets several source <programming languages> reuse the same analyses and target support. For a small textual example, `%y = add i32 %x, 1` defines a new 32-bit <integer> value from an earlier one. The value `%y` is defined once even if the source program repeatedly assigns to a source variable.
Back to article page