Package soot.jimple.toolkits.scalar.pre
Class LatestComputation
- java.lang.Object
-
- soot.jimple.toolkits.scalar.pre.LatestComputation
-
public class LatestComputation extends Object
Performs a Latest-Computation on the given graph. a computation is latest, when we can't delay it anymore. This uses the Delayability-analysis. More precise: The delayability-analysis says us already until which point we can delay a computation from the earliest computation-point. We just have to search for points, where there's a computation, or, where we can't delay the computation to one of the successors.
-
-
Constructor Summary
Constructors Constructor Description LatestComputation(UnitGraph unitGraph, DelayabilityAnalysis delayed, Map<Unit,EquivalentValue> equivRhsMap)given a DelayabilityAnalysis and the computations of each unit, calculates the latest computation-point for each expression.LatestComputation(UnitGraph unitGraph, DelayabilityAnalysis delayed, Map<Unit,EquivalentValue> equivRhsMap, BoundedFlowSet<EquivalentValue> set)given a DelayabilityAnalysis and the computations of each unit, calculates the latest computation-point for each expression.
theequivRhsMapcould be calculated on the fly, but it is very likely that it already exists (as similar maps are used for calculating Earliestness, Delayed,...
the shared set allows more efficient set-operations, when they the computation is merged with other analyses/computations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlowSet<EquivalentValue>getFlowBefore(Object node)returns the set of expressions, that have their latest computation just beforenode.
-
-
-
Constructor Detail
-
LatestComputation
public LatestComputation(UnitGraph unitGraph, DelayabilityAnalysis delayed, Map<Unit,EquivalentValue> equivRhsMap)
given a DelayabilityAnalysis and the computations of each unit, calculates the latest computation-point for each expression. theequivRhsMapcould be calculated on the fly, but it is very likely that it already exists (as similar maps are used for calculating Earliestness, Delayed,...- Parameters:
unitGraph- a UnitGraphdelayed- the delayability-analysis of the same graph.equivRhsMap- all computations of the graph
-
LatestComputation
public LatestComputation(UnitGraph unitGraph, DelayabilityAnalysis delayed, Map<Unit,EquivalentValue> equivRhsMap, BoundedFlowSet<EquivalentValue> set)
given a DelayabilityAnalysis and the computations of each unit, calculates the latest computation-point for each expression.
theequivRhsMapcould be calculated on the fly, but it is very likely that it already exists (as similar maps are used for calculating Earliestness, Delayed,...
the shared set allows more efficient set-operations, when they the computation is merged with other analyses/computations.- Parameters:
unitGraph- a UnitGraphdelayed- the delayability-analysis of the same graph.equivRhsMap- all computations of the graphset- the shared flowSet
-
-
Method Detail
-
getFlowBefore
public FlowSet<EquivalentValue> getFlowBefore(Object node)
returns the set of expressions, that have their latest computation just beforenode.- Parameters:
node- an Object of the flow-graph (in our case always a Unit).- Returns:
- a FlowSet containing the expressions.
-
-