diff options
author | Devang Patel <dpatel@apple.com> | 2007-06-12 17:35:20 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-06-12 17:35:20 +0000 |
commit | 47419ee14287d587c0c88578ff3ccfa43a1806d8 (patch) | |
tree | 12bb643209ce10aeeb8c54bc65dc3dcc1b295316 /llvm/lib/VMCore/Dominators.cpp | |
parent | 2f9d2bcb19b9663043d71b06adcc6b874c868206 (diff) | |
download | bcm5719-llvm-47419ee14287d587c0c88578ff3ccfa43a1806d8.tar.gz bcm5719-llvm-47419ee14287d587c0c88578ff3ccfa43a1806d8.zip |
Remove redundant check.
llvm-svn: 37561
Diffstat (limited to 'llvm/lib/VMCore/Dominators.cpp')
-rw-r--r-- | llvm/lib/VMCore/Dominators.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/VMCore/Dominators.cpp b/llvm/lib/VMCore/Dominators.cpp index 35b2bbfc224..74c585fd6a4 100644 --- a/llvm/lib/VMCore/Dominators.cpp +++ b/llvm/lib/VMCore/Dominators.cpp @@ -380,13 +380,6 @@ BasicBlock *DominatorTreeBase::findNearestCommonDominator(BasicBlock *A, if (A == &Entry || B == &Entry) return &Entry; - // If A and B are same then A is nearest common dominator. - DomTreeNode *NodeA = getNode(A); - if (A != 0 && A == B) - return A; - - DomTreeNode *NodeB = getNode(B); - // If B dominates A then B is nearest common dominator. if (dominates(B,A)) return B; @@ -395,6 +388,9 @@ BasicBlock *DominatorTreeBase::findNearestCommonDominator(BasicBlock *A, if (dominates(A,B)) return A; + DomTreeNode *NodeA = getNode(A); + DomTreeNode *NodeB = getNode(B); + // Collect NodeA dominators set. SmallPtrSet<DomTreeNode*, 16> NodeADoms; NodeADoms.insert(NodeA); |