= SSA <> is an <>, translated from <> by <>, optimized by <>, and translated by <> to <>. == Description <> is a <>, <> <>. It is the main <> used for optimizations. An <> program consists of a collection of datatype declarations, a sequence of global statements, and a collection of functions, along with a distinguished "main" function. Each function consists of a collection of basic blocks, where each basic block is a sequence of statements ending with some control transfer. == Implementation * https://github.com/MLton/mlton/blob/master/mlton/ssa/ssa.sig[`ssa.sig`] * https://github.com/MLton/mlton/blob/master/mlton/ssa/ssa.fun[`ssa.fun`] * https://github.com/MLton/mlton/blob/master/mlton/ssa/ssa-tree.sig[`ssa-tree.sig`] * https://github.com/MLton/mlton/blob/master/mlton/ssa/ssa-tree.fun[`ssa-tree.fun`] == Type Checking Type checking (https://github.com/MLton/mlton/blob/master/mlton/ssa/type-check.sig[`type-check.sig`], https://github.com/MLton/mlton/blob/master/mlton/ssa/type-check.fun[`type-check.fun`]) of a <> program verifies the following: * no duplicate definitions (tycons, cons, vars, labels, funcs) * no out of scope references (tycons, cons, vars, labels, funcs) * variable definitions dominate variable uses * case transfers are exhaustive and irredundant * `Enter`/`Leave` profile statements match * "traditional" well-typedness == Details and Notes SSA is an abbreviation for Static Single Assignment. For some initial design discussion, see the thread at: * http://mlton.org/pipermail/mlton/2001-August/019689.html For some retrospectives, see the threads at: * http://mlton.org/pipermail/mlton/2003-January/023054.html * http://mlton.org/pipermail/mlton/2007-February/029597.html