[llvm-commits] CVS: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp LCSSA.cpp LoopSimplify.cpp

Devang Patel dpatel at apple.com
Sat Jun 2 23:26:48 PDT 2007



Changes in directory llvm/lib/Transforms/Utils:

BreakCriticalEdges.cpp updated: 1.48 -> 1.49
LCSSA.cpp updated: 1.43 -> 1.44
LoopSimplify.cpp updated: 1.96 -> 1.97
---
Log message:

s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g



---
Diffs of the changes:  (+15 -15)

 BreakCriticalEdges.cpp |    8 ++++----
 LCSSA.cpp              |   16 ++++++++--------
 LoopSimplify.cpp       |    6 +++---
 3 files changed, 15 insertions(+), 15 deletions(-)


Index: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
diff -u llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.48 llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.49
--- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.48	Sun May  6 08:37:16 2007
+++ llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp	Sun Jun  3 01:26:14 2007
@@ -203,20 +203,20 @@
   
   // Should we update DominatorTree information?
   if (DominatorTree *DT = P->getAnalysisToUpdate<DominatorTree>()) {
-    DominatorTree::Node *TINode = DT->getNode(TIBB);
+    DominatorTree::DomTreeNode *TINode = DT->getNode(TIBB);
 
     // The new block is not the immediate dominator for any other nodes, but
     // TINode is the immediate dominator for the new node.
     //
     if (TINode) {       // Don't break unreachable code!
-      DominatorTree::Node *NewBBNode = DT->createNewNode(NewBB, TINode);
-      DominatorTree::Node *DestBBNode = 0;
+      DominatorTree::DomTreeNode *NewBBNode = DT->createNewNode(NewBB, TINode);
+      DominatorTree::DomTreeNode *DestBBNode = 0;
      
       // If NewBBDominatesDestBB hasn't been computed yet, do so with DT.
       if (!OtherPreds.empty()) {
         DestBBNode = DT->getNode(DestBB);
         while (!OtherPreds.empty() && NewBBDominatesDestBB) {
-          if (DominatorTree::Node *OPNode = DT->getNode(OtherPreds.back()))
+          if (DominatorTree::DomTreeNode *OPNode = DT->getNode(OtherPreds.back()))
             NewBBDominatesDestBB = DestBBNode->dominates(OPNode);
           OtherPreds.pop_back();
         }


Index: llvm/lib/Transforms/Utils/LCSSA.cpp
diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.43 llvm/lib/Transforms/Utils/LCSSA.cpp:1.44
--- llvm/lib/Transforms/Utils/LCSSA.cpp:1.43	Fri May 11 16:10:54 2007
+++ llvm/lib/Transforms/Utils/LCSSA.cpp	Sun Jun  3 01:26:14 2007
@@ -75,8 +75,8 @@
     void getLoopValuesUsedOutsideLoop(Loop *L,
                                       SetVector<Instruction*> &AffectedValues);
 
-    Value *GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst,
-                            std::map<DominatorTree::Node*, Value*> &Phis);
+    Value *GetValueForBlock(DominatorTree::DomTreeNode *BB, Instruction *OrigInst,
+                            std::map<DominatorTree::DomTreeNode*, Value*> &Phis);
 
     /// inLoop - returns true if the given block is within the current loop
     const bool inLoop(BasicBlock* B) {
@@ -146,16 +146,16 @@
   ++NumLCSSA; // We are applying the transformation
 
   // Keep track of the blocks that have the value available already.
-  std::map<DominatorTree::Node*, Value*> Phis;
+  std::map<DominatorTree::DomTreeNode*, Value*> Phis;
 
-  DominatorTree::Node *InstrNode = DT->getNode(Instr->getParent());
+  DominatorTree::DomTreeNode *InstrNode = DT->getNode(Instr->getParent());
 
   // Insert the LCSSA phi's into the exit blocks (dominated by the value), and
   // add them to the Phi's map.
   for (std::vector<BasicBlock*>::const_iterator BBI = exitBlocks.begin(),
       BBE = exitBlocks.end(); BBI != BBE; ++BBI) {
     BasicBlock *BB = *BBI;
-    DominatorTree::Node *ExitBBNode = DT->getNode(BB);
+    DominatorTree::DomTreeNode *ExitBBNode = DT->getNode(BB);
     Value *&Phi = Phis[ExitBBNode];
     if (!Phi && InstrNode->dominates(ExitBBNode)) {
       PHINode *PN = new PHINode(Instr->getType(), Instr->getName()+".lcssa",
@@ -229,8 +229,8 @@
 
 /// GetValueForBlock - Get the value to use within the specified basic block.
 /// available values are in Phis.
-Value *LCSSA::GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst,
-                               std::map<DominatorTree::Node*, Value*> &Phis) {
+Value *LCSSA::GetValueForBlock(DominatorTree::DomTreeNode *BB, Instruction *OrigInst,
+                               std::map<DominatorTree::DomTreeNode*, Value*> &Phis) {
   // If there is no dominator info for this BB, it is unreachable.
   if (BB == 0)
     return UndefValue::get(OrigInst->getType());
@@ -239,7 +239,7 @@
   Value *&V = Phis[BB];
   if (V) return V;
 
-  DominatorTree::Node *IDom = BB->getIDom();
+  DominatorTree::DomTreeNode *IDom = BB->getIDom();
 
   // Otherwise, there are two cases: we either have to insert a PHI node or we
   // don't.  We need to insert a PHI node if this block is not dominated by one


Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.96 llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.97
--- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.96	Sun May  6 08:37:16 2007
+++ llvm/lib/Transforms/Utils/LoopSimplify.cpp	Sun Jun  3 01:26:14 2007
@@ -778,15 +778,15 @@
       }
       assert(NewBBIDom && "No immediate dominator found??");
     }
-    DominatorTree::Node *NewBBIDomNode = DT->getNode(NewBBIDom);
+    DominatorTree::DomTreeNode *NewBBIDomNode = DT->getNode(NewBBIDom);
 
     // Create the new dominator tree node... and set the idom of NewBB.
-    DominatorTree::Node *NewBBNode = DT->createNewNode(NewBB, NewBBIDomNode);
+    DominatorTree::DomTreeNode *NewBBNode = DT->createNewNode(NewBB, NewBBIDomNode);
 
     // If NewBB strictly dominates other blocks, then it is now the immediate
     // dominator of NewBBSucc.  Update the dominator tree as appropriate.
     if (NewBBDominatesNewBBSucc) {
-      DominatorTree::Node *NewBBSuccNode = DT->getNode(NewBBSucc);
+      DominatorTree::DomTreeNode *NewBBSuccNode = DT->getNode(NewBBSucc);
       DT->changeImmediateDominator(NewBBSuccNode, NewBBNode);
     }
   }






More information about the llvm-commits mailing list