Add new dominator tree node into dominator tree node map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37475 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2007-06-06 20:08:11 +00:00
parent a18a424f98
commit 7d832fe6c1

View File

@ -289,7 +289,9 @@ void DominatorTree::calculate(Function& F) {
// Add a new tree node for this BasicBlock, and link it as a child of
// IDomNode
BBNode = IDomNode->addChild(new DomTreeNode(I, IDomNode));
DomTreeNode *C = new DomTreeNode(I, IDomNode);
DomTreeNodes[I] = C;
BBNode = IDomNode->addChild(C);
}
}
@ -338,7 +340,9 @@ DomTreeNode *DominatorTree::getNodeForBlock(BasicBlock *BB) {
// Add a new tree node for this BasicBlock, and link it as a child of
// IDomNode
return BBNode = IDomNode->addChild(new DomTreeNode(BB, IDomNode));
DomTreeNode *C = new DomTreeNode(BB, IDomNode);
DomTreeNodes[BB] = C;
return BBNode = IDomNode->addChild(C);
}
static std::ostream &operator<<(std::ostream &o,