Class CombinedDUAnalysis

    • Constructor Detail

      • CombinedDUAnalysis

        public CombinedDUAnalysis​(UnitGraph graph)
    • Method Detail

      • getDefsOfAt

        public List<Unit> getDefsOfAt​(Local l,
                                      Unit s)
        Description copied from interface: LocalDefs
        Returns the definition sites for a Local at a certain point (Unit) in a method. You can assume this method never returns null.
        Specified by:
        getDefsOfAt in interface LocalDefs
        Parameters:
        l - the Local in question.
        s - a unit that specifies the method context (location) to query for the definitions of the Local.
        Returns:
        a list of Units where the local is defined in the current method context. If there are no uses an empty list will returned.
      • getDefsOf

        public List<Unit> getDefsOf​(Local l)
        Description copied from interface: LocalDefs
        Returns the definition sites for a Local merged over all points in a method. You can assume this method never returns null.
        Specified by:
        getDefsOf in interface LocalDefs
        Parameters:
        l - the Local in question.
        Returns:
        a list of Units where the local is defined in the current method context. If there are no uses an empty list will returned.
      • getUsesOf

        public List<UnitValueBoxPair> getUsesOf​(Unit u)
        Description copied from interface: LocalUses
        Returns a list of the Units that use the Local that is defined by a given Unit.
        Specified by:
        getUsesOf in interface LocalUses
        Parameters:
        u - the unit we wish to query for the use of the Local it defines.
        Returns:
        a list of the uses Local's uses.
      • getLiveLocalsBefore

        public List<Local> getLiveLocalsBefore​(Unit u)
        Description copied from interface: LiveLocals
        Returns the list of Locals that are live before the specified Unit.
        Specified by:
        getLiveLocalsBefore in interface LiveLocals
        Parameters:
        u - the Unit that defines this query.
        Returns:
        a list of Locals that are live before the specified unit in the method.
      • getLiveLocalsAfter

        public List<Local> getLiveLocalsAfter​(Unit u)
        Description copied from interface: LiveLocals
        Returns the list of Locals that are live after the specified Unit.
        Specified by:
        getLiveLocalsAfter in interface LiveLocals
        Parameters:
        u - the Unit that defines this query.
        Returns:
        a list of Locals that are live after the specified unit in the method.
      • flowThrough

        protected void flowThrough​(FlowSet<ValueBox> out,
                                   Unit u,
                                   FlowSet<ValueBox> in)
        Description copied from class: FlowAnalysis
        Given the merge of the out sets, compute the in set for s (or in to out, depending on direction). This function often causes confusion, because the same interface is used for both forward and backward flow analyses. The first parameter is always the argument to the flow function (i.e. it is the "in" set in a forward analysis and the "out" set in a backward analysis), and the third parameter is always the result of the flow function (i.e. it is the "out" set in a forward analysis and the "in" set in a backward analysis).
        Specified by:
        flowThrough in class FlowAnalysis<Unit,​FlowSet<ValueBox>>
        Parameters:
        out - the input flow
        u - the current node
        in - the returned flow