[llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp
Devang Patel
dpatel at apple.com
Mon Jun 11 17:55:03 PDT 2007
Changes in directory llvm/lib/VMCore:
Dominators.cpp updated: 1.113 -> 1.114
---
Log message:
Break DominatorTree from ETNode.
Remove unused PostETForest.
---
Diffs of the changes: (+3 -19)
Dominators.cpp | 22 +++-------------------
1 files changed, 3 insertions(+), 19 deletions(-)
Index: llvm/lib/VMCore/Dominators.cpp
diff -u llvm/lib/VMCore/Dominators.cpp:1.113 llvm/lib/VMCore/Dominators.cpp:1.114
--- llvm/lib/VMCore/Dominators.cpp:1.113 Mon Jun 11 19:40:51 2007
+++ llvm/lib/VMCore/Dominators.cpp Mon Jun 11 19:54:38 2007
@@ -235,9 +235,7 @@
BasicBlock* Root = Roots[0];
// Add a node for the root...
- ETNode *ERoot = new ETNode(Root);
- ETNodes[Root] = ERoot;
- DomTreeNodes[Root] = RootNode = new DomTreeNode(Root, 0, ERoot);
+ DomTreeNodes[Root] = RootNode = new DomTreeNode(Root, 0);
Vertex.push_back(0);
@@ -292,9 +290,7 @@
// Add a new tree node for this BasicBlock, and link it as a child of
// IDomNode
- ETNode *ET = new ETNode(I);
- ETNodes[I] = ET;
- DomTreeNode *C = new DomTreeNode(I, IDomNode, ET);
+ DomTreeNode *C = new DomTreeNode(I, IDomNode);
DomTreeNodes[I] = C;
BBNode = IDomNode->addChild(C);
}
@@ -320,9 +316,6 @@
if (BBNode) {
if (!BBNode->getIDom())
BBNode->assignDFSNumber(dfsnum);
- //ETNode *ETN = BBNode->getETNode();
- //if (ETN && !ETN->hasFather())
- // ETN->assignDFSNumber(dfsnum);
}
}
SlowQueries = 0;
@@ -472,13 +465,6 @@
// Switch to new dominator
IDom = NewIDom;
IDom->Children.push_back(this);
-
- if (!ETN->hasFather())
- ETN->setFather(IDom->getETNode());
- else if (ETN->getFather()->getData<BasicBlock>() != IDom->getBlock()) {
- ETN->Split();
- ETN->setFather(IDom->getETNode());
- }
}
}
@@ -493,9 +479,7 @@
// Add a new tree node for this BasicBlock, and link it as a child of
// IDomNode
- ETNode *ET = new ETNode(BB);
- ETNodes[BB] = ET;
- DomTreeNode *C = new DomTreeNode(BB, IDomNode, ET);
+ DomTreeNode *C = new DomTreeNode(BB, IDomNode);
DomTreeNodes[BB] = C;
return BBNode = IDomNode->addChild(C);
}
More information about the llvm-commits
mailing list