[llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp
Devang Patel
dpatel at apple.com
Tue Jun 12 10:35:41 PDT 2007
Changes in directory llvm/lib/VMCore:
Dominators.cpp updated: 1.115 -> 1.116
---
Log message:
Remove redundant check.
---
Diffs of the changes: (+3 -7)
Dominators.cpp | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
Index: llvm/lib/VMCore/Dominators.cpp
diff -u llvm/lib/VMCore/Dominators.cpp:1.115 llvm/lib/VMCore/Dominators.cpp:1.116
--- llvm/lib/VMCore/Dominators.cpp:1.115 Tue Jun 12 12:17:57 2007
+++ llvm/lib/VMCore/Dominators.cpp Tue Jun 12 12:35:20 2007
@@ -380,13 +380,6 @@
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 @@
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);
More information about the llvm-commits
mailing list