diff options
| author | Diego Novillo <dnovillo@google.com> | 2013-11-26 20:11:12 +0000 |
|---|---|---|
| committer | Diego Novillo <dnovillo@google.com> | 2013-11-26 20:11:12 +0000 |
| commit | e43611fc45ad0151949aaab96131670f25b3dccb (patch) | |
| tree | dd1d06d93640250d30c7af364e39fb3a02785bd5 | |
| parent | 39b804f8a48d0e7d7c7ecec1e07a436b0923acb9 (diff) | |
| download | bcm5719-llvm-e43611fc45ad0151949aaab96131670f25b3dccb.tar.gz bcm5719-llvm-e43611fc45ad0151949aaab96131670f25b3dccb.zip | |
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
| -rw-r--r-- | llvm/include/llvm/Analysis/Dominators.h | 4 | ||||
| -rw-r--r-- | llvm/include/llvm/Analysis/PostDominators.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/llvm/include/llvm/Analysis/Dominators.h b/llvm/include/llvm/Analysis/Dominators.h index 3aa0beb6bb1..e35e101de39 100644 --- a/llvm/include/llvm/Analysis/Dominators.h +++ b/llvm/include/llvm/Analysis/Dominators.h @@ -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); diff --git a/llvm/include/llvm/Analysis/PostDominators.h b/llvm/include/llvm/Analysis/PostDominators.h index 88ebab4edec..c99ecb38c5d 100644 --- a/llvm/include/llvm/Analysis/PostDominators.h +++ b/llvm/include/llvm/Analysis/PostDominators.h @@ -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(); } |

