Package pascal.taie.util.graph
Class DominatorFinder<N>
java.lang.Object
pascal.taie.util.graph.DominatorFinder<N>
Finds dominators for the nodes in given
Graph
.-
Constructor Summary
ConstructorDescriptionDominatorFinder
(Graph<N> graph) DominatorFinder
(Graph<N> graph, boolean isSparse) DominatorFinder
(Graph<N> graph, Indexer<N> indexer, boolean isSparse) Constructs a dominator finder with a graph and given indexer. -
Method Summary
Modifier and TypeMethodDescriptiongetDominatorsOf
(N node) getNodesDominatedBy
(N dominator) boolean
isDominatedBy
(N node, N dominator)
-
Constructor Details
-
DominatorFinder
-
DominatorFinder
-
DominatorFinder
Constructs a dominator finder with a graph and given indexer. Note thatindexer
must assign continuous indexes for nodes ingraph
, starting from 0, otherwise the finder may throw exception.
-
-
Method Details
-
getDominatorsOf
- Returns:
- the dominators of
node
.
-
getNodesDominatedBy
- Returns:
- the nodes dominated by the
dominator
.
-
isDominatedBy
- Returns:
true
ifdominator
is a dominator ofnode
.
-