summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-21 22:30:50 +0000
committerChris Lattner <sabre@nondot.org>2009-09-21 22:30:50 +0000
commit75c7c995b7ed5a5b7527a80d2bbc2b60720b1312 (patch)
treefac5f8923d57bf2c610d5cfbd589a01d222dcdf0 /include
parent0e657faee5b34b6967c2d0c9966e4e4146427835 (diff)
downloadllvm-75c7c995b7ed5a5b7527a80d2bbc2b60720b1312.tar.gz
llvm-75c7c995b7ed5a5b7527a80d2bbc2b60720b1312.tar.bz2
llvm-75c7c995b7ed5a5b7527a80d2bbc2b60720b1312.tar.xz
move DominatorTree::dominates for instructions out of line,
no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/Dominators.h27
1 files changed, 3 insertions, 24 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 846bf1e5f8..e8aceaa622 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -748,34 +748,13 @@ public:
// dominates - Return true if A dominates B. This performs the
// special checks necessary if A and B are in the same basic block.
- bool dominates(const Instruction *A, const Instruction *B) const {
- const BasicBlock *BBA = A->getParent(), *BBB = B->getParent();
- if (BBA != BBB) return dominates(BBA, BBB);
+ bool dominates(const Instruction *A, const Instruction *B) const;
- // It is not possible to determine dominance between two PHI nodes
- // based on their ordering.
- if (isa<PHINode>(A) && isa<PHINode>(B))
- return false;
-
- // Loop through the basic block until we find A or B.
- BasicBlock::const_iterator I = BBA->begin();
- for (; &*I != A && &*I != B; ++I) /*empty*/;
-
- //if(!DT.IsPostDominators) {
- // A dominates B if it is found first in the basic block.
- return &*I == A;
- //} else {
- // // A post-dominates B if B is found first in the basic block.
- // return &*I == B;
- //}
- }
-
- inline bool properlyDominates(const DomTreeNode* A,
- const DomTreeNode* B) const {
+ bool properlyDominates(const DomTreeNode *A, const DomTreeNode *B) const {
return DT->properlyDominates(A, B);
}
- inline bool properlyDominates(BasicBlock* A, BasicBlock* B) const {
+ bool properlyDominates(BasicBlock *A, BasicBlock *B) const {
return DT->properlyDominates(A, B);
}