diff options
author | Tim Shen <timshen91@gmail.com> | 2016-08-17 20:01:58 +0000 |
---|---|---|
committer | Tim Shen <timshen91@gmail.com> | 2016-08-17 20:01:58 +0000 |
commit | 8b58bdfe6fee0f9e32fbf4ee78427806338e4f1b (patch) | |
tree | 41024e50213316bdabe8eb6aef9846cbd467072a /llvm/lib/IR/Dominators.cpp | |
parent | 84ff18ba927a9cacb328c4187c0194a58a0262e1 (diff) | |
download | bcm5719-llvm-8b58bdfe6fee0f9e32fbf4ee78427806338e4f1b.tar.gz bcm5719-llvm-8b58bdfe6fee0f9e32fbf4ee78427806338e4f1b.zip |
[GenericDomTree] Change GenericDomTree to use NodeRef in GraphTraits. NFC.
Summary:
Looking at the implementation, GenericDomTree has more specific
requirements on NodeRef, e.g. NodeRefObject->getParent() should compile,
and NodeRef should be a pointer. We can remove the pointer requirement,
but it seems to have little gain, given the limited use cases.
Also changed GraphTraits<Inverse<Inverse<T>> to be more accurate.
Reviewers: dblaikie, chandlerc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23593
llvm-svn: 278961
Diffstat (limited to 'llvm/lib/IR/Dominators.cpp')
-rw-r--r-- | llvm/lib/IR/Dominators.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/IR/Dominators.cpp b/llvm/lib/IR/Dominators.cpp index 5c3a2de95c5..c70c589e799 100644 --- a/llvm/lib/IR/Dominators.cpp +++ b/llvm/lib/IR/Dominators.cpp @@ -64,9 +64,13 @@ template class llvm::DomTreeNodeBase<BasicBlock>; template class llvm::DominatorTreeBase<BasicBlock>; template void llvm::Calculate<Function, BasicBlock *>( - DominatorTreeBase<GraphTraits<BasicBlock *>::NodeType> &DT, Function &F); + DominatorTreeBase< + typename std::remove_pointer<GraphTraits<BasicBlock *>::NodeRef>::type> + &DT, + Function &F); template void llvm::Calculate<Function, Inverse<BasicBlock *>>( - DominatorTreeBase<GraphTraits<Inverse<BasicBlock *>>::NodeType> &DT, + DominatorTreeBase<typename std::remove_pointer< + GraphTraits<Inverse<BasicBlock *>>::NodeRef>::type> &DT, Function &F); // dominates - Return true if Def dominates a use in User. This performs |