Package edu.umd.cs.findbugs.ba
Class DominatorsAnalysis
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis<java.util.BitSet>
-
- edu.umd.cs.findbugs.ba.AbstractDominatorsAnalysis
-
- edu.umd.cs.findbugs.ba.DominatorsAnalysis
-
- All Implemented Interfaces:
DataflowAnalysis<java.util.BitSet>
- Direct Known Subclasses:
NonExceptionDominatorsAnalysis
,NonImplicitExceptionDominatorsAnalysis
public class DominatorsAnalysis extends AbstractDominatorsAnalysis
Dataflow analysis to compute dominator sets for a CFG.- See Also:
CFG
,AbstractDominatorsAnalysis
-
-
Field Summary
Fields Modifier and Type Field Description private DepthFirstSearch
dfs
-
Constructor Summary
Constructors Constructor Description DominatorsAnalysis(CFG cfg, DepthFirstSearch dfs, boolean ignoreExceptionEdges)
Constructor.DominatorsAnalysis(CFG cfg, DepthFirstSearch dfs, EdgeChooser edgeChooser)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlockOrder
getBlockOrder(CFG cfg)
Return the BlockOrder specifying the order in which BasicBlocks should be visited in the main dataflow loop.boolean
isForwards()
Returns true if the analysis is forwards, false if backwards.-
Methods inherited from class edu.umd.cs.findbugs.ba.AbstractDominatorsAnalysis
copy, createFact, getAllDominatedBy, getAllDominatorsOf, initEntryFact, isTop, makeFactTop, meetInto, same, transfer
-
Methods inherited from class edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis
edgeTransfer, factToString, finishIteration, getFactAfterLocation, getFactAtLocation, getFactOnEdge, getLastUpdateTimestamp, getResultFact, getStartFact, resultFactIterator, setLastUpdateTimestamp, startIteration
-
-
-
-
Field Detail
-
dfs
private final DepthFirstSearch dfs
-
-
Constructor Detail
-
DominatorsAnalysis
public DominatorsAnalysis(CFG cfg, DepthFirstSearch dfs, EdgeChooser edgeChooser)
Constructor.- Parameters:
cfg
- the CFG to compute dominator relationships fordfs
- the DepthFirstSearch on the CFGedgeChooser
- EdgeChooser to choose which Edges to consider significant
-
DominatorsAnalysis
public DominatorsAnalysis(CFG cfg, DepthFirstSearch dfs, boolean ignoreExceptionEdges)
Constructor.- Parameters:
cfg
- the CFG to compute dominator relationships fordfs
- the DepthFirstSearch on the CFGignoreExceptionEdges
- true if exception edges should be ignored
-
-
Method Detail
-
isForwards
public boolean isForwards()
Description copied from interface:DataflowAnalysis
Returns true if the analysis is forwards, false if backwards.
-
getBlockOrder
public BlockOrder getBlockOrder(CFG cfg)
Description copied from interface:DataflowAnalysis
Return the BlockOrder specifying the order in which BasicBlocks should be visited in the main dataflow loop.- Parameters:
cfg
- the CFG upon which we're performing dataflow analysis
-
-