DepsAnalyzer

public final class DepsAnalyzer extends DataFlowAnalyzer

Analyzer in charge of the plain dependency analysis, from every input to every output whose value may change if the input’s value changes.

Feature: derives from DataFlowAnalyzer : OK
Feature: able to analyze recursive code: OK
Feature: distinguishes structure elemts: OK
Feature: takes  care  of  pointer dests: OK
Feature: refine on loop-local variables: no
Feature: std method for call arguments : OK
Feature: able to analyze sub-flow-graph: OK

Methods

accumulateValuesFromUpstream

protected boolean accumulateValuesFromUpstream()

Collects the data-flow information from the incoming flow arrows.

buildDefaultIntrinsicDependencies

protected static BoolMatrix buildDefaultIntrinsicDependencies(Unit calledUnit)

compareChannelZoneDataDownstream

protected boolean compareChannelZoneDataDownstream(int mpZone, Block refBlock)

compareDownstreamValues

protected boolean compareDownstreamValues()

Compares the downstream data-flow info with the collected values of previous sweep.

Returns

true when something has changed and therefore another Flow Graph sweep is probably necessary.

compareUpstreamValues

protected boolean compareUpstreamValues()

Compares data-flow info with the collected values of previous sweep. returns true when something has changed and therefore another Flow Graph sweep is probably necessary.

initializeCGForUnit

protected Object initializeCGForUnit()

During initialization for plain dependency analysis on the whole CallGraph, do whatever initialization is needed for “unit”.

initializeFGForBlock

protected void initializeFGForBlock()

Initializes dependency info before propagation. Mostly, this fills the depsThrough “BlockStorage”, which is the BoolMatrix plain dependence matrix just after each Block, wrt the values of the zones at the beginning of the Block.

initializeInitBlock

protected void initializeInitBlock()

initializeUnit

protected void initializeUnit()

Initialize just before plain dependency analysis on “curUnit”.

propagateValuesForwardThroughBlock

protected boolean propagateValuesForwardThroughBlock()

Propagates the data-flow information forwards through “curBlock”.

runAnalysis

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

Main entry point. Builds a Dependencies Analyzer, stores it and runs it.

setCurBlockEtc

protected void setCurBlockEtc(Block block)

setCurUnitEtc

public void setCurUnitEtc(Unit unit)

terminateUnit

protected boolean terminateUnit()