mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 17:56:53 +00:00
Add PostDominatorTree::getDescendants.
This patch adds the counter-part to DominatorTree::getDescendants. It also fixes a couple of comments I noticed out of date in the DominatorTree class. llvm-svn: 195778
This commit is contained in:
parent
bbf2455d59
commit
c8e93646d8
@ -346,7 +346,7 @@ public:
|
||||
DomTreeNodeBase<NodeT> *getRootNode() { return RootNode; }
|
||||
const DomTreeNodeBase<NodeT> *getRootNode() const { return RootNode; }
|
||||
|
||||
/// Get all nodes dominated by R, including R itself. Return true on success.
|
||||
/// Get all nodes dominated by R, including R itself.
|
||||
void getDescendants(NodeT *R, SmallVectorImpl<NodeT *> &Result) const {
|
||||
const DomTreeNodeBase<NodeT> *RN = getNode(R);
|
||||
SmallVector<const DomTreeNodeBase<NodeT> *, 8> WL;
|
||||
@ -769,7 +769,7 @@ public:
|
||||
return DT->getRootNode();
|
||||
}
|
||||
|
||||
/// Get all nodes dominated by R, including R itself. Return true on success.
|
||||
/// Get all nodes dominated by R, including R itself.
|
||||
void getDescendants(BasicBlock *R,
|
||||
SmallVectorImpl<BasicBlock *> &Result) const {
|
||||
DT->getDescendants(R, Result);
|
||||
|
@ -79,6 +79,12 @@ struct PostDominatorTree : public FunctionPass {
|
||||
return DT->findNearestCommonDominator(A, B);
|
||||
}
|
||||
|
||||
/// Get all nodes post-dominated by R, including R itself.
|
||||
void getDescendants(BasicBlock *R,
|
||||
SmallVectorImpl<BasicBlock *> &Result) const {
|
||||
DT->getDescendants(R, Result);
|
||||
}
|
||||
|
||||
virtual void releaseMemory() {
|
||||
DT->releaseMemory();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user