[llvm-commits] [llvm] r40830 - in /llvm/trunk/lib: Analysis/PostDominators.cpp VMCore/Dominators.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 4 17:24:30 PDT 2007
Author: lattner
Date: Sat Aug 4 19:24:30 2007
New Revision: 40830
URL: http://llvm.org/viewvc/llvm-project?rev=40830&view=rev
Log:
Fix an iterator invalidation bug I induced.
Modified:
llvm/trunk/lib/Analysis/PostDominators.cpp
llvm/trunk/lib/VMCore/Dominators.cpp
Modified: llvm/trunk/lib/Analysis/PostDominators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PostDominators.cpp?rev=40830&r1=40829&r2=40830&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/PostDominators.cpp (original)
+++ llvm/trunk/lib/Analysis/PostDominators.cpp Sat Aug 4 19:24:30 2007
@@ -217,8 +217,7 @@
// Add a new tree node for this BasicBlock, and link it as a child of
// IDomNode
DomTreeNode *C = new DomTreeNode(BB, IPDomNode);
- DomTreeNodes[BB] = C;
- return BBNode = IPDomNode->addChild(C);
+ return DomTreeNodes[BB] = IPDomNode->addChild(C);
}
//===----------------------------------------------------------------------===//
Modified: llvm/trunk/lib/VMCore/Dominators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Dominators.cpp?rev=40830&r1=40829&r2=40830&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Dominators.cpp (original)
+++ llvm/trunk/lib/VMCore/Dominators.cpp Sat Aug 4 19:24:30 2007
@@ -120,7 +120,8 @@
}
- // Find NewBB's immediate dominator and create new dominator tree node for NewBB.
+ // Find NewBB's immediate dominator and create new dominator tree node for
+ // NewBB.
BasicBlock *NewBBIDom = 0;
unsigned i = 0;
for (i = 0; i < PredBlocks.size(); ++i)
@@ -552,8 +553,7 @@
// Add a new tree node for this BasicBlock, and link it as a child of
// IDomNode
DomTreeNode *C = new DomTreeNode(BB, IDomNode);
- DomTreeNodes[BB] = C;
- return BBNode = IDomNode->addChild(C);
+ return DomTreeNodes[BB] = IDomNode->addChild(C);
}
static std::ostream &operator<<(std::ostream &o,
More information about the llvm-commits
mailing list