ReachAnalyzer

public final class ReachAnalyzer extends DataFlowAnalyzer

A very simple analyzer to find places that the control flow can reach. The analysis works by setting each Block’s fields “reachUp” and “reachDown”, which are initially “false”.

Methods

accumulateValuesFromDownstream

protected boolean accumulateValuesFromDownstream()

accumulateValuesFromUpstream

protected boolean accumulateValuesFromUpstream()

analyze

protected boolean analyze()

compareDownstreamValues

protected boolean compareDownstreamValues()

compareUpstreamValues

protected boolean compareUpstreamValues()

initializeCGForRootUnit

protected void initializeCGForRootUnit()

initializeCGForUnit

protected Object initializeCGForUnit()

initializeFGForBlock

protected void initializeFGForBlock()

initializeFGForInitBlock

protected void initializeFGForInitBlock()

initializeFGForUnit

protected void initializeFGForUnit()

propagateValuesBackwardThroughBlock

protected boolean propagateValuesBackwardThroughBlock()

propagateValuesForwardThroughBlock

protected boolean propagateValuesForwardThroughBlock()

run

protected void run(TapList<Unit> rootUnits)

Runs reach analysis, bottom-up from the leaves of the CallGraph. As a result, fills the backReachUp and reachDown fields of each Block.

runAnalysis

public static void runAnalysis(CallGraph callGraph, TapList<Unit> rootUnits)

Main trigger method. Runs reach analysis under the given rootUnits.

terminateFGForUnit

protected boolean terminateFGForUnit()