This document discusses Static Single Assignment (SSA) and other related intermediate forms. SSA is an intermediate representation that renames variables (registers, memory accesses and array accesses) such that a property of static single assignment holds. We assume that the program is represented as a control-flow graph of basic blocks and that these are built up of instructions.
φ (phi) nodes/instructions that represent a join of all the definitions of a variable if multiple definitions exist in the control-flow graph. Placed at the top of basic blocks.
Each variable is assigned to at most once.
Only flow dependencies exist, however this property doesn't hold for arrays or for pointers.
Control-flow extension to SSA
γ (gamma) nodes/instructions that replace φ-nodes and have an extra field for a condition operand.
Pointer analysis extension to SSA
The inverse of SSA for uses
Λ (Lambda) nodes/instructions that represent a split of a value for subsequent uses.
Each variable is used at most once.
If used with SSA only flow dependencies will exist with one def-use chain. If not used with SSA then flow and anti dependences may be some what simpler.
SSU has been used for store elimination.
SSA plus the inverse of SSA for defs
σ (sigma) nodes/instructions that take a variable and give a split that represents all future definitions. Placed at the end of basic blocks
σ nodes/instructions enable forward propagation of data.
SSA with extensions for arrays
dφ and uφ nodes/instructions to represent definitions to a particular array or uses of a particular array.
Array SSA extends SSA so that it is useful for eliminating redundant loads and stores to arrays.
Array SSA with extensions for strongly typed languages.
Also extensions for bound check elimination.
Heap operands associated with instructions.
Π (Pi) instructions placed following comparisons.
Memory variables are said to exist in disjoint (non-aliasing) Heaps thereby reducing the number of potential dependencies.
Π instructions used to prove that particular use of a variable is within a given range.
Array SSA with extensions to specify index ranges
Heap operands to instructions with information on the indexs used
Knowing index information can reduce the number of dependencies.
Copy nodes to produce unique copies of operands.
Variables are linearly named so that they are used at most once.
Scope exceeds SSU?
Linear naming with definitions being unique
dφ and uφ nodes/instructions used as in Array SSA
SSA with redundant (copying) φ nodes following loops.
Simplifies loop optimisations as definitions of escaping variables need only be added for phi nodes following the loop.