Package soot.jimple.toolkits.scalar
Class CommonSubexpressionEliminator
- java.lang.Object
-
- soot.Transformer
-
- soot.BodyTransformer
-
- soot.jimple.toolkits.scalar.CommonSubexpressionEliminator
-
public class CommonSubexpressionEliminator extends BodyTransformer
Runs an available expressions analysis on a body, then eliminates common subexpressions. This implementation is especially slow, as it does not run on basic blocks. A better implementation (which wouldn't catch every single cse, but would get most) would use basic blocks instead. It is also slow because the flow universe is explicitly created; it need not be. A better implementation would implicitly compute the kill sets at every node.
-
-
Constructor Summary
Constructors Constructor Description CommonSubexpressionEliminator(Singletons.Global g)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinternalTransform(Body b, String phaseName, Map<String,String> options)Common subexpression eliminator.static CommonSubexpressionEliminatorv()-
Methods inherited from class soot.BodyTransformer
transform, transform, transform
-
-
-
-
Constructor Detail
-
CommonSubexpressionEliminator
public CommonSubexpressionEliminator(Singletons.Global g)
-
-
Method Detail
-
v
public static CommonSubexpressionEliminator v()
-
internalTransform
protected void internalTransform(Body b, String phaseName, Map<String,String> options)
Common subexpression eliminator.- Specified by:
internalTransformin classBodyTransformer- Parameters:
b- the body on which to apply the transformationphaseName- the phasename for this transform; not typically used by implementations.options- the actual computed options; a combination of default options and Scene specified options.
-
-