mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195778 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -346,7 +346,7 @@ public:
|
|||||||
DomTreeNodeBase<NodeT> *getRootNode() { return RootNode; }
|
DomTreeNodeBase<NodeT> *getRootNode() { return RootNode; }
|
||||||
const DomTreeNodeBase<NodeT> *getRootNode() const { 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 {
|
void getDescendants(NodeT *R, SmallVectorImpl<NodeT *> &Result) const {
|
||||||
const DomTreeNodeBase<NodeT> *RN = getNode(R);
|
const DomTreeNodeBase<NodeT> *RN = getNode(R);
|
||||||
SmallVector<const DomTreeNodeBase<NodeT> *, 8> WL;
|
SmallVector<const DomTreeNodeBase<NodeT> *, 8> WL;
|
||||||
@@ -769,7 +769,7 @@ public:
|
|||||||
return DT->getRootNode();
|
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,
|
void getDescendants(BasicBlock *R,
|
||||||
SmallVectorImpl<BasicBlock *> &Result) const {
|
SmallVectorImpl<BasicBlock *> &Result) const {
|
||||||
DT->getDescendants(R, Result);
|
DT->getDescendants(R, Result);
|
||||||
|
@@ -79,6 +79,12 @@ struct PostDominatorTree : public FunctionPass {
|
|||||||
return DT->findNearestCommonDominator(A, B);
|
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() {
|
virtual void releaseMemory() {
|
||||||
DT->releaseMemory();
|
DT->releaseMemory();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user