[llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp

Devang Patel dpatel at apple.com
Wed Jun 6 13:08:33 PDT 2007



Changes in directory llvm/lib/VMCore:

Dominators.cpp updated: 1.105 -> 1.106
---
Log message:

Add new dominator tree node into dominator tree node map.


---
Diffs of the changes:  (+6 -2)

 Dominators.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Index: llvm/lib/VMCore/Dominators.cpp
diff -u llvm/lib/VMCore/Dominators.cpp:1.105 llvm/lib/VMCore/Dominators.cpp:1.106
--- llvm/lib/VMCore/Dominators.cpp:1.105	Mon Jun  4 12:38:00 2007
+++ llvm/lib/VMCore/Dominators.cpp	Wed Jun  6 15:08:11 2007
@@ -289,7 +289,9 @@
 
         // 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 @@
 
   // 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,






More information about the llvm-commits mailing list