4 <:SSA2:> is an <:IntermediateLanguage:>, translated from <:SSA:> by
5 <:ToSSA2:>, optimized by <:SSA2Simplify:>, and translated by
6 <:ToRSSA:> to <:RSSA:>.
10 <:SSA2:> is a <:FirstOrder:>, <:SimplyTyped:>
11 <:IntermediateLanguage:>, a slight variant of the <:SSA:>
12 <:IntermediateLanguage:>,
14 Like <:SSA:>, an <:SSA2:> program consists of a collection of datatype
15 declarations, a sequence of global statements, and a collection of
16 functions, along with a distinguished "main" function. Each function
17 consists of a collection of basic blocks, where each basic block is a
18 sequence of statements ending with some control transfer.
20 Unlike <:SSA:>, <:SSA2:> includes mutable fields in objects and makes
21 the vector type constructor n-ary instead of unary. This allows
22 optimizations like <:RefFlatten:> and <:DeepFlatten:> to be expressed.
26 * <!ViewGitFile(mlton,master,mlton/ssa/ssa2.sig)>
27 * <!ViewGitFile(mlton,master,mlton/ssa/ssa2.fun)>
28 * <!ViewGitFile(mlton,master,mlton/ssa/ssa-tree2.sig)>
29 * <!ViewGitFile(mlton,master,mlton/ssa/ssa-tree2.fun)>
33 Type checking (<!ViewGitFile(mlton,master,mlton/ssa/type-check2.sig)>,
34 <!ViewGitFile(mlton,master,mlton/ssa/type-check2.fun)>) of a <:SSA2:>
35 program verifies the following:
37 * no duplicate definitions (tycons, cons, vars, labels, funcs)
38 * no out of scope references (tycons, cons, vars, labels, funcs)
39 * variable definitions dominate variable uses
40 * case transfers are exhaustive and irredundant
41 * `Enter`/`Leave` profile statements match
42 * "traditional" well-typedness
44 == Details and Notes ==
46 SSA is an abbreviation for Static Single Assignment.