ABSTRACT

This chapter presents an intermediate form of programs called single static assignment (SSA) form that is useful for many optimizations. Because of the sparseness of def-use chains in the representation, optimizations based on SSA form can be performed efficiently. A program in SSA form reduces the number of def-use chains by introducing a separate variable version for each definition of the same variable reaching a join node. Transformation of a program to SSA form results in a sparser representation of defuses chains. The benefit that results due to this sparsity is an improvement in time to perform the optimization. The number of def-use edges in a program in SSA form is smaller than the program from which it was constructed, thus reducing the time required for the analysis. The chapter shows that the SSA-transformation algorithm maintains semantic invariance. In the traditional sequence of events during compilation, the program in SSA form is destructed before register allocation takes place.