edu.umd.cs.findbugs.ba
public abstract class AbstractDominatorsAnalysis extends BasicAbstractDataflowAnalysis<BitSet>
Subclasses extend this class to compute either dominators or postdominators.
An EdgeChooser may be specified to select which edges to take into account. For example, exception edges could be ignored.
See Also: DataflowAnalysis CFG BasicBlock
Constructor Summary | |
---|---|
AbstractDominatorsAnalysis(CFG cfg, boolean ignoreExceptionEdges)
Constructor.
| |
AbstractDominatorsAnalysis(CFG cfg, EdgeChooser edgeChooser)
Constructor.
|
Method Summary | |
---|---|
void | copy(BitSet source, BitSet dest) |
BitSet | createFact() |
BitSet | getAllDominatedBy(BasicBlock dominator)
Get a bitset containing the unique IDs of
all blocks in CFG dominated (or postdominated, depending
on how the analysis was done) by given block.
|
BitSet | getAllDominatorsOf(BasicBlock block)
Get a bitset containing the unique IDs of
all blocks which dominate (or postdominate) the given block.
|
void | initEntryFact(BitSet result) |
void | initResultFact(BitSet result) |
boolean | isTop(BitSet fact) |
void | makeFactTop(BitSet fact) |
void | meetInto(BitSet fact, Edge edge, BitSet result) |
boolean | same(BitSet fact1, BitSet fact2) |
void | transfer(BasicBlock basicBlock, InstructionHandle end, BitSet start, BitSet result) |
Parameters: cfg the CFG to compute dominator relationships for ignoreExceptionEdges true if exception edges should be ignored
Parameters: cfg the CFG to compute dominator relationships for edgeChooser EdgeChooser to choose which Edges to consider significant
Parameters: dominator we want to get all blocks dominated (or postdominated) by this block
Returns: BitSet of the ids of all blocks dominated by the given block
Parameters: block a BasicBlock
Returns: BitSet of the unique IDs of all blocks that dominate (or postdominate) the BasicBlock