Package EDU.purdue.cs.bloat.ssa
Class SSA
- java.lang.Object
-
- EDU.purdue.cs.bloat.ssa.SSA
-
public class SSA extends java.lang.ObjectCompute the SSA form of the control flow graph and build FUD chains.The SSA algorithm is from:
R. Cytron, J. Ferrante J, B. K. Rosen, M. N. Wegman, and F. K. Zadeck, "Efficiently Computing Static Single Assignment Form and the Control Dependence Graph", TOPLAS, 13(4): 451-490, October 1991.I made modifications to the algorithm to compute FUD chains and to run the algorithm separately for each variable similar to the SSAPRE algorithm. Making a separate pass for each variable allows variables to be added incrementally.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUG
-
Constructor Summary
Constructors Constructor Description SSA()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidtransform(FlowGraph cfg)Transforms a control flow graph into Single Static Assignment (SSA) form.static voidtransform(FlowGraph cfg, SSAConstructionInfo info)Performs the actions necessary to convert a CFG into SSA form with respect to one variable.
-
-
-
Method Detail
-
transform
public static void transform(FlowGraph cfg)
Transforms a control flow graph into Single Static Assignment (SSA) form. First, the CFG is traversed and a list of all variables (both local and stack) eligible for SSA renaming is compiled. Variables are represented by instances of SSAConstructionInfo. Each of these variables is then transformed.- See Also:
transform(FlowGraph),SSAConstructionInfo
-
transform
public static void transform(FlowGraph cfg, SSAConstructionInfo info)
Performs the actions necessary to convert a CFG into SSA form with respect to one variable. The variable's information is stored in the SSAConstructionInfo.
-
-