[llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp CorrelatedExprs.cpp LICM.cpp LoopPreheaders.cpp PRE.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Sep 11 11:27:11 PDT 2003


Changes in directory llvm/lib/Transforms/Scalar:

ADCE.cpp updated: 1.60 -> 1.61
CorrelatedExprs.cpp updated: 1.12 -> 1.13
LICM.cpp updated: 1.33 -> 1.34
LoopPreheaders.cpp updated: 1.15 -> 1.16
PRE.cpp updated: 1.4 -> 1.5

---
Log message:

Renamed DominatorTree::Node::getNode() -> getBlock()



---
Diffs of the changes:

Index: llvm/lib/Transforms/Scalar/ADCE.cpp
diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.60 llvm/lib/Transforms/Scalar/ADCE.cpp:1.61
--- llvm/lib/Transforms/Scalar/ADCE.cpp:1.60	Wed Sep 10 15:38:14 2003
+++ llvm/lib/Transforms/Scalar/ADCE.cpp	Thu Sep 11 11:26:10 2003
@@ -344,14 +344,14 @@
             } else {
               PostDominatorTree::Node *NextNode = LastNode->getIDom();
 
-              while (!AliveBlocks.count(NextNode->getNode())) {
+              while (!AliveBlocks.count(NextNode->getBlock())) {
                 LastNode = NextNode;
                 NextNode = NextNode->getIDom();
               }
             
               // Get the basic blocks that we need...
-              BasicBlock *LastDead = LastNode->getNode();
-              BasicBlock *NextAlive = NextNode->getNode();
+              BasicBlock *LastDead = LastNode->getBlock();
+              BasicBlock *NextAlive = NextNode->getBlock();
 
               // Make the conditional branch now go to the next alive block...
               TI->getSuccessor(i)->removePredecessor(BB);


Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.12 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.13
--- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.12	Wed Sep 10 00:29:03 2003
+++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp	Thu Sep 11 11:26:10 2003
@@ -338,7 +338,7 @@
   DominatorTree::Node *BBN = (*DT)[BB];
   if (!RI.empty())        // Time opt: only propagate if we can change something
     for (unsigned i = 0, e = BBN->getChildren().size(); i != e; ++i) {
-      BasicBlock *Dominated = BBN->getChildren()[i]->getNode();
+      BasicBlock *Dominated = BBN->getChildren()[i]->getBlock();
       assert(RegionInfoMap.find(Dominated) == RegionInfoMap.end() &&
              "RegionInfo should be calculated in dominanace order!");
       getRegionInfo(Dominated) = RI;
@@ -363,7 +363,7 @@
 
   // Now that all of our successors have information, recursively process them.
   for (unsigned i = 0, e = BBN->getChildren().size(); i != e; ++i)
-    Changed |= TransformRegion(BBN->getChildren()[i]->getNode(), VisitedBlocks);
+    Changed |= TransformRegion(BBN->getChildren()[i]->getBlock(),VisitedBlocks);
 
   return Changed;
 }


Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.33 llvm/lib/Transforms/Scalar/LICM.cpp:1.34
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.33	Thu Sep 11 10:32:37 2003
+++ llvm/lib/Transforms/Scalar/LICM.cpp	Thu Sep 11 11:26:10 2003
@@ -245,12 +245,12 @@
   assert(N != 0 && "Null dominator tree node?");
 
   // If this subregion is not in the top level loop at all, exit.
-  if (!CurLoop->contains(N->getNode())) return;
+  if (!CurLoop->contains(N->getBlock())) return;
 
   // Only need to hoist the contents of this block if it is not part of a
   // subloop (which would already have been hoisted)
-  if (!inSubLoop(N->getNode()))
-    visit(*N->getNode());
+  if (!inSubLoop(N->getBlock()))
+    visit(*N->getBlock());
 
   const std::vector<DominatorTree::Node*> &Children = N->getChildren();
   for (unsigned i = 0, e = Children.size(); i != e; ++i)
@@ -305,7 +305,7 @@
         IDom = IDom->getIDom();
 
         //See if we exited the loop.
-        if(!CurLoop->contains(IDom->getNode()))
+        if(!CurLoop->contains(IDom->getBlock()))
           return false;
       }
     }


Index: llvm/lib/Transforms/Scalar/LoopPreheaders.cpp
diff -u llvm/lib/Transforms/Scalar/LoopPreheaders.cpp:1.15 llvm/lib/Transforms/Scalar/LoopPreheaders.cpp:1.16
--- llvm/lib/Transforms/Scalar/LoopPreheaders.cpp:1.15	Tue Sep  9 16:54:45 2003
+++ llvm/lib/Transforms/Scalar/LoopPreheaders.cpp	Thu Sep 11 11:26:11 2003
@@ -366,7 +366,7 @@
       NewBBIDomNode = DT->getNode(NewBBIDom);
     } else {
       NewBBIDomNode = DT->getNode(LoopBlocks[0]); // Random pred
-      while (!NewBBDomSet.count(NewBBIDomNode->getNode())) {
+      while (!NewBBDomSet.count(NewBBIDomNode->getBlock())) {
         NewBBIDomNode = NewBBIDomNode->getIDom();
         assert(NewBBIDomNode && "No shared dominator found??");
       }


Index: llvm/lib/Transforms/Scalar/PRE.cpp
diff -u llvm/lib/Transforms/Scalar/PRE.cpp:1.4 llvm/lib/Transforms/Scalar/PRE.cpp:1.5
--- llvm/lib/Transforms/Scalar/PRE.cpp:1.4	Tue Sep  9 16:54:45 2003
+++ llvm/lib/Transforms/Scalar/PRE.cpp	Thu Sep 11 11:26:11 2003
@@ -165,7 +165,7 @@
 void PRE::MarkPostDominatingBlocksAnticipatible(PostDominatorTree::Node *N,
                                                 std::vector<char> &AntBlocks,
                                                 Instruction *Occurrence) {
-  unsigned BlockNo = BlockNumbering[N->getNode()];
+  unsigned BlockNo = BlockNumbering[N->getBlock()];
 
   if (AntBlocks[BlockNo]) return;  // Already known to be anticipatible??
 
@@ -174,7 +174,7 @@
   // "transparency".
   for (unsigned i = 0, e = Occurrence->getNumOperands(); i != e; ++i)
     if (Instruction *I = dyn_cast<Instruction>(Occurrence->getOperand(i)))
-      if (I->getParent() == N->getNode())  // Operand is defined in this block!
+      if (I->getParent() == N->getBlock())  // Operand is defined in this block!
         return;
 
   if (isa<LoadInst>(Occurrence))
@@ -246,14 +246,14 @@
   DominatorTree::Node *N = DT->getNode(Occurrence->getParent());
   for (df_iterator<DominatorTree::Node*> DI = df_begin(N), E = df_end(N);
        DI != E; ++DI)
-    AvailableBlocks[(*DI)->getNode()] = Occurrence;
+    AvailableBlocks[(*DI)->getBlock()] = Occurrence;
 }
 
 /// ReplaceDominatedAvailableOccurrencesWith - This loops over the region
 /// dominated by N, replacing any available expressions with NewOcc.
 void PRE::ReplaceDominatedAvailableOccurrencesWith(Instruction *NewOcc,
                                                    DominatorTree::Node *N) {
-  BasicBlock *BB = N->getNode();
+  BasicBlock *BB = N->getBlock();
   Instruction *&ExistingAvailableVal = AvailableBlocks[BB];
 
   // If there isn't a definition already active in this node, make this the new
@@ -280,7 +280,7 @@
     // Mark NewOCC as the Available expression in all blocks dominated by BB
     for (df_iterator<DominatorTree::Node*> DI = df_begin(N), E = df_end(N);
          DI != E; ++DI)
-      AvailableBlocks[(*DI)->getNode()] = NewOcc;
+      AvailableBlocks[(*DI)->getBlock()] = NewOcc;
   }  
 }
 





More information about the llvm-commits mailing list