Class 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 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. 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:
        unitGraph - a UnitGraph
        delayed - 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.
        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:
        unitGraph - a UnitGraph
        delayed - the delayability-analysis of the same graph.
        equivRhsMap - all computations of the graph
        set - the shared flowSet
    • Method Detail

      • getFlowBefore

        public FlowSet<EquivalentValue> 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.