public class LazyCodeMotion extends BodyTransformer
In order to catch every redundant expression, this transformation must be done on a graph without critical edges. Therefore the first thing we do, is removing them. A subsequent pass can then easily remove the synthetic nodes we have introduced.
The term "lazy" refers to the fact, that we move computations only if necessary.
CriticalEdgeRemover
Constructor and Description |
---|
LazyCodeMotion(Singletons.Global g) |
Modifier and Type | Method and Description |
---|---|
protected void |
internalTransform(Body b,
java.lang.String phaseName,
java.util.Map<java.lang.String,java.lang.String> opts)
performs the lazy code motion.
|
static LazyCodeMotion |
v() |
transform, transform, transform
public static LazyCodeMotion v()
protected void internalTransform(Body b, java.lang.String phaseName, java.util.Map<java.lang.String,java.lang.String> opts)
internalTransform
in class BodyTransformer
b
- the body on which to apply the transformationphaseName
- the phasename for this transform; not typically used by implementations.opts
- the actual computed options; a combination of default options and Scene specified options.