soot.jimple.toolkits.scalar.pre
Class LatestComputation

java.lang.Object
  extended by 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 succesors.


Constructor Summary
LatestComputation(UnitGraph unitGraph, DelayabilityAnalysis delayed, Map equivRhsMap)
          given a DelayabilityAnalysis and the computations of each unit, calculates the latest computation-point for each expression.
LatestComputation(UnitGraph unitGraph, DelayabilityAnalysis delayed, Map equivRhsMap, BoundedFlowSet set)
          given a DelayabilityAnalysis and the computations of each unit, calculates the latest computation-point for each expression.
the equivRhsMap could 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
 Object getFlowBefore(Object node)
          returns the set of expressions, that have their latest computation just before node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatestComputation

public LatestComputation(UnitGraph unitGraph,
                         DelayabilityAnalysis delayed,
                         Map equivRhsMap)
given a DelayabilityAnalysis and the computations of each unit, calculates the latest computation-point for each expression. the equivRhsMap could be calculated on the fly, but it is very likely that it already exists (as similar maps are used for calculating Earliestness, Delayed,...

Parameters:
dg - a ExceptionalUnitGraph
delayed - the delayability-analysis of the same graph.
equivRhsMap - all computations of the graph

LatestComputation

public LatestComputation(UnitGraph unitGraph,
                         DelayabilityAnalysis delayed,
                         Map equivRhsMap,
                         BoundedFlowSet set)
given a DelayabilityAnalysis and the computations of each unit, calculates the latest computation-point for each expression.
the equivRhsMap could 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:
dg - a ExceptionalUnitGraph
delayed - the delayability-analysis of the same graph.
equivRhsMap - all computations of the graph
set - the shared flowSet
Method Detail

getFlowBefore

public Object getFlowBefore(Object node)
returns the set of expressions, that have their latest computation just before node.

Parameters:
node - an Object of the flow-graph (in our case always a unit).
Returns:
a FlowSet containing the expressions.