diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-24 22:52:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-24 22:52:25 +0000 |
commit | 42c487d2e529489648176ebb8e9ef022c07ef785 (patch) | |
tree | 4b9d495252dd95cb83aa914414436757181ce65f | |
parent | 6231d5be410e2d7967352b29ad01522fda15680d (diff) | |
download | external_llvm-42c487d2e529489648176ebb8e9ef022c07ef785.zip external_llvm-42c487d2e529489648176ebb8e9ef022c07ef785.tar.gz external_llvm-42c487d2e529489648176ebb8e9ef022c07ef785.tar.bz2 |
Avoid using dominatedBySlowTreeWalk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153398 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index c384925..0d2222d 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -338,9 +338,12 @@ public: /// Note that this is not a constant time operation! /// bool properlyDominates(const DomTreeNodeBase<NodeT> *A, - const DomTreeNodeBase<NodeT> *B) const { - if (A == 0 || B == 0) return false; - return dominatedBySlowTreeWalk(A, B); + const DomTreeNodeBase<NodeT> *B) { + if (A == 0 || B == 0) + return false; + if (A == B) + return false; + return dominates(A, B); } inline bool properlyDominates(const NodeT *A, const NodeT *B) { @@ -350,8 +353,8 @@ public: // Cast away the const qualifiers here. This is ok since // this function doesn't actually return the values returned // from getNode. - return properlyDominates(getNode(const_cast<NodeT *>(A)), - getNode(const_cast<NodeT *>(B))); + return dominates(getNode(const_cast<NodeT *>(A)), + getNode(const_cast<NodeT *>(B))); } bool dominatedBySlowTreeWalk(const DomTreeNodeBase<NodeT> *A, |