[llvm-commits] CVS: llvm/lib/Transforms/Utils/CodeExtractor.cpp
Owen Anderson
resistor at mac.com
Tue Apr 17 21:46:52 PDT 2007
Changes in directory llvm/lib/Transforms/Utils:
CodeExtractor.cpp updated: 1.53 -> 1.54
---
Log message:
Use new ETForest accessor.
---
Diffs of the changes: (+4 -4)
CodeExtractor.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: llvm/lib/Transforms/Utils/CodeExtractor.cpp
diff -u llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.53 llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.54
--- llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.53 Mon Apr 16 13:10:23 2007
+++ llvm/lib/Transforms/Utils/CodeExtractor.cpp Tue Apr 17 23:46:35 2007
@@ -142,14 +142,14 @@
// Okay, update dominator sets. The blocks that dominate the new one are the
// blocks that dominate TIBB plus the new block itself.
if (EF) {
- DominatorTree::Node* idom = DT->getNode(OldPred)->getIDom();
- DT->createNewNode(NewBB, idom);
- EF->addNewBlock(NewBB, idom->getBlock());
+ BasicBlock* idom = EF->getIDom(OldPred);
+ DT->createNewNode(NewBB, DT->getNode(idom));
+ EF->addNewBlock(NewBB, idom);
// Additionally, NewBB replaces OldPred as the immediate dominator of blocks
Function *F = Header->getParent();
for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I)
- if (DT->getNode(I)->getIDom()->getBlock() == OldPred) {
+ if (EF->getIDom(I) == OldPred) {
DT->changeImmediateDominator(DT->getNode(I), DT->getNode(NewBB));
EF->setImmediateDominator(I, NewBB);
}
More information about the llvm-commits
mailing list