public class CombinedDUAnalysis extends BackwardFlowAnalysis<Unit,FlowSet<ValueBox>> implements CombinedAnalysis, LocalDefs, LocalUses, LiveLocals
FlowAnalysis.FlowLocalDefs.FactoryLocalUses.FactoryLiveLocals.FactoryfilterUnitToAfterFlow, unitToAfterFlowfilterUnitToBeforeFlow, graph, unitToBeforeFlow| Constructor and Description |
|---|
CombinedDUAnalysis(UnitGraph graph) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copy(FlowSet<ValueBox> source,
FlowSet<ValueBox> dest)
Creates a copy of the
source flow object in dest. |
protected FlowSet<ValueBox> |
entryInitialFlow()
Returns the initial flow value for entry/exit graph nodes.
|
protected void |
flowThrough(FlowSet<ValueBox> out,
Unit u,
FlowSet<ValueBox> in)
Given the merge of the
out sets, compute the in
set for s (or in to out, depending on direction). |
java.util.List<Unit> |
getDefsOf(Local l)
Returns the definition sites for a Local merged over all points
in a method.
|
java.util.List<Unit> |
getDefsOfAt(Local l,
Unit s)
Returns the definition sites for a Local at a certain
point (Unit) in a method.
|
java.util.List<Local> |
getLiveLocalsAfter(Unit u)
Returns the list of Locals that are live after the specified
Unit.
|
java.util.List<Local> |
getLiveLocalsBefore(Unit u)
Returns the list of Locals that are live before the specified
Unit.
|
java.util.List<UnitValueBoxPair> |
getUsesOf(Unit u)
Returns a list of the Units that use the Local that is
defined by a given Unit.
|
protected void |
merge(FlowSet<ValueBox> inout,
FlowSet<ValueBox> in) |
protected void |
merge(FlowSet<ValueBox> in1,
FlowSet<ValueBox> in2,
FlowSet<ValueBox> out)
Compute the merge of the
in1 and in2 sets, putting the result into out. |
protected FlowSet<ValueBox> |
newInitialFlow()
Returns the flow object corresponding to the initial values for
each graph node.
|
doAnalysis, isForwardgetFlow, getFlowAfter, getFlowBefore, omissiblemerge, mergeInto, treatTrapHandlersAsEntriespublic CombinedDUAnalysis(UnitGraph graph)
public java.util.List<Unit> getDefsOfAt(Local l, Unit s)
LocalDefsnull.getDefsOfAt in interface LocalDefsl - the Local in question.s - a unit that specifies the method context (location)
to query for the definitions of the Local.public java.util.List<Unit> getDefsOf(Local l)
LocalDefsnull.public java.util.List<UnitValueBoxPair> getUsesOf(Unit u)
LocalUsespublic java.util.List<Local> getLiveLocalsBefore(Unit u)
LiveLocalsgetLiveLocalsBefore in interface LiveLocalsu - the Unit that defines this query.public java.util.List<Local> getLiveLocalsAfter(Unit u)
LiveLocalsgetLiveLocalsAfter in interface LiveLocalsu - the Unit that defines this query.protected void merge(FlowSet<ValueBox> in1, FlowSet<ValueBox> in2, FlowSet<ValueBox> out)
AbstractFlowAnalysisin1 and in2 sets, putting the result into out.
The behavior of this function depends on the implementation ( it may be necessary to check whether
in1 and in2 are equal or aliased ).
Used by the doAnalysis method.merge in class AbstractFlowAnalysis<Unit,FlowSet<ValueBox>>protected void flowThrough(FlowSet<ValueBox> out, Unit u, FlowSet<ValueBox> in)
FlowAnalysisout 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).flowThrough in class FlowAnalysis<Unit,FlowSet<ValueBox>>out - the input flowu - the current nodein - the returned flowprotected FlowSet<ValueBox> entryInitialFlow()
AbstractFlowAnalysisAbstractFlowAnalysis.newInitialFlow()entryInitialFlow in class AbstractFlowAnalysis<Unit,FlowSet<ValueBox>>protected FlowSet<ValueBox> newInitialFlow()
AbstractFlowAnalysisnewInitialFlow in class AbstractFlowAnalysis<Unit,FlowSet<ValueBox>>protected void copy(FlowSet<ValueBox> source, FlowSet<ValueBox> dest)
AbstractFlowAnalysissource flow object in dest.copy in class AbstractFlowAnalysis<Unit,FlowSet<ValueBox>>