[llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp GCSE.cpp GVNPRE.cpp LICM.cpp PredicateSimplifier.cpp

Devang Patel dpatel at apple.com
Sun Jun 3 17:32:54 PDT 2007



Changes in directory llvm/lib/Transforms/Scalar:

ADCE.cpp updated: 1.111 -> 1.112
GCSE.cpp updated: 1.58 -> 1.59
GVNPRE.cpp updated: 1.14 -> 1.15
LICM.cpp updated: 1.103 -> 1.104
PredicateSimplifier.cpp updated: 1.76 -> 1.77
---
Log message:

s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g


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

 ADCE.cpp                |    4 ++--
 GCSE.cpp                |    2 +-
 GVNPRE.cpp              |    8 ++++----
 LICM.cpp                |   16 ++++++++--------
 PredicateSimplifier.cpp |   22 +++++++++++-----------
 5 files changed, 26 insertions(+), 26 deletions(-)


Index: llvm/lib/Transforms/Scalar/ADCE.cpp
diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.111 llvm/lib/Transforms/Scalar/ADCE.cpp:1.112
--- llvm/lib/Transforms/Scalar/ADCE.cpp:1.111	Sun Jun  3 01:26:14 2007
+++ llvm/lib/Transforms/Scalar/ADCE.cpp	Sun Jun  3 19:32:21 2007
@@ -387,8 +387,8 @@
           // postdominator that is alive, and the last postdominator that is
           // dead...
           //
-          PostDominatorTree::DomTreeNode *LastNode = DT[TI->getSuccessor(i)];
-          PostDominatorTree::DomTreeNode *NextNode = 0;
+          DomTreeNode *LastNode = DT[TI->getSuccessor(i)];
+          DomTreeNode *NextNode = 0;
 
           if (LastNode) {
             NextNode = LastNode->getIDom();


Index: llvm/lib/Transforms/Scalar/GCSE.cpp
diff -u llvm/lib/Transforms/Scalar/GCSE.cpp:1.58 llvm/lib/Transforms/Scalar/GCSE.cpp:1.59
--- llvm/lib/Transforms/Scalar/GCSE.cpp:1.58	Sun Jun  3 01:26:14 2007
+++ llvm/lib/Transforms/Scalar/GCSE.cpp	Sun Jun  3 19:32:21 2007
@@ -94,7 +94,7 @@
 
   // Traverse the CFG of the function in dominator order, so that we see each
   // instruction after we see its operands.
-  for (df_iterator<DominatorTree::DomTreeNode*> DI = df_begin(DT.getRootNode()),
+  for (df_iterator<DomTreeNode*> DI = df_begin(DT.getRootNode()),
          E = df_end(DT.getRootNode()); DI != E; ++DI) {
     BasicBlock *BB = DI->getBlock();
 


Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp
diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.14 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.15
--- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.14	Sun Jun  3 17:02:14 2007
+++ llvm/lib/Transforms/Scalar/GVNPRE.cpp	Sun Jun  3 19:32:21 2007
@@ -88,7 +88,7 @@
     // For a given block, calculate the generated expressions, temporaries,
     // and the AVAIL_OUT set
     void CalculateAvailOut(ValueTable& VN, std::set<Value*, ExprLT>& MS,
-                       DominatorTree::DomTreeNode* DI,
+                       DomTreeNode* DI,
                        std::set<Value*, ExprLT>& currExps,
                        std::set<PHINode*>& currPhis,
                        std::set<Value*>& currTemps,
@@ -271,7 +271,7 @@
 }
 
 void GVNPRE::CalculateAvailOut(GVNPRE::ValueTable& VN, std::set<Value*, ExprLT>& MS,
-                       DominatorTree::DomTreeNode* DI,
+                       DomTreeNode* DI,
                        std::set<Value*, ExprLT>& currExps,
                        std::set<PHINode*>& currPhis,
                        std::set<Value*>& currTemps,
@@ -333,7 +333,7 @@
   // First Phase of BuildSets - calculate AVAIL_OUT
   
   // Top-down walk of the dominator tree
-  for (df_iterator<DominatorTree::DomTreeNode*> DI = df_begin(DT.getRootNode()),
+  for (df_iterator<DomTreeNode*> DI = df_begin(DT.getRootNode()),
          E = df_end(DT.getRootNode()); DI != E; ++DI) {
     
     // Get the sets to update for this block
@@ -359,7 +359,7 @@
     std::set<Value*, ExprLT> anticOut;
     
     // Top-down walk of the postdominator tree
-    for (df_iterator<PostDominatorTree::DomTreeNode*> PDI = 
+    for (df_iterator<DomTreeNode*> PDI = 
          df_begin(PDT.getRootNode()), E = df_end(DT.getRootNode());
          PDI != E; ++PDI) {
       BasicBlock* BB = PDI->getBlock();


Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.103 llvm/lib/Transforms/Scalar/LICM.cpp:1.104
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.103	Sun Jun  3 01:26:14 2007
+++ llvm/lib/Transforms/Scalar/LICM.cpp	Sun Jun  3 19:32:21 2007
@@ -107,7 +107,7 @@
     /// visit uses before definitions, allowing us to sink a loop body in one
     /// pass without iteration.
     ///
-    void SinkRegion(DominatorTree::DomTreeNode *N);
+    void SinkRegion(DomTreeNode *N);
 
     /// HoistRegion - Walk the specified region of the CFG (defined by all
     /// blocks dominated by the specified block, and that are in the current
@@ -115,7 +115,7 @@
     /// visit definitions before uses, allowing us to hoist a loop body in one
     /// pass without iteration.
     ///
-    void HoistRegion(DominatorTree::DomTreeNode *N);
+    void HoistRegion(DomTreeNode *N);
 
     /// inSubLoop - Little predicate that returns true if the specified basic
     /// block is in a subloop of the current one, not the current one itself.
@@ -140,8 +140,8 @@
       if (BlockInLoop == LoopHeader)
         return true;
 
-      DominatorTree::DomTreeNode *BlockInLoopNode = DT->getNode(BlockInLoop);
-      DominatorTree::DomTreeNode *IDom            = DT->getNode(ExitBlock);
+      DomTreeNode *BlockInLoopNode = DT->getNode(BlockInLoop);
+      DomTreeNode *IDom            = DT->getNode(ExitBlock);
 
       // Because the exit block is not in the loop, we know we have to get _at
       // least_ its immediate dominator.
@@ -281,7 +281,7 @@
 /// uses before definitions, allowing us to sink a loop body in one pass without
 /// iteration.
 ///
-void LICM::SinkRegion(DominatorTree::DomTreeNode *N) {
+void LICM::SinkRegion(DomTreeNode *N) {
   assert(N != 0 && "Null dominator tree node?");
   BasicBlock *BB = N->getBlock();
 
@@ -289,7 +289,7 @@
   if (!CurLoop->contains(BB)) return;
 
   // We are processing blocks in reverse dfo, so process children first...
-  const std::vector<DominatorTree::DomTreeNode*> &Children = N->getChildren();
+  const std::vector<DomTreeNode*> &Children = N->getChildren();
   for (unsigned i = 0, e = Children.size(); i != e; ++i)
     SinkRegion(Children[i]);
 
@@ -318,7 +318,7 @@
 /// first order w.r.t the DominatorTree.  This allows us to visit definitions
 /// before uses, allowing us to hoist a loop body in one pass without iteration.
 ///
-void LICM::HoistRegion(DominatorTree::DomTreeNode *N) {
+void LICM::HoistRegion(DomTreeNode *N) {
   assert(N != 0 && "Null dominator tree node?");
   BasicBlock *BB = N->getBlock();
 
@@ -340,7 +340,7 @@
         hoist(I);
       }
 
-  const std::vector<DominatorTree::DomTreeNode*> &Children = N->getChildren();
+  const std::vector<DomTreeNode*> &Children = N->getChildren();
   for (unsigned i = 0, e = Children.size(); i != e; ++i)
     HoistRegion(Children[i]);
 }


Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.76 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.77
--- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.76	Sun Jun  3 01:26:14 2007
+++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp	Sun Jun  3 19:32:21 2007
@@ -1986,7 +1986,7 @@
     UnreachableBlocks UB;
     ValueRanges *VR;
 
-    std::vector<DominatorTree::DomTreeNode *> WorkList;
+    std::vector<DomTreeNode *> WorkList;
 
   public:
     static char ID; // Pass identification, replacement for typeid
@@ -2012,14 +2012,14 @@
     class VISIBILITY_HIDDEN Forwards : public InstVisitor<Forwards> {
       friend class InstVisitor<Forwards>;
       PredicateSimplifier *PS;
-      DominatorTree::DomTreeNode *DTNode;
+      DomTreeNode *DTNode;
 
     public:
       InequalityGraph &IG;
       UnreachableBlocks &UB;
       ValueRanges &VR;
 
-      Forwards(PredicateSimplifier *PS, DominatorTree::DomTreeNode *DTNode)
+      Forwards(PredicateSimplifier *PS, DomTreeNode *DTNode)
         : PS(PS), DTNode(DTNode), IG(*PS->IG), UB(PS->UB), VR(*PS->VR) {}
 
       void visitTerminatorInst(TerminatorInst &TI);
@@ -2040,19 +2040,19 @@
     // Used by terminator instructions to proceed from the current basic
     // block to the next. Verifies that "current" dominates "next",
     // then calls visitBasicBlock.
-    void proceedToSuccessors(DominatorTree::DomTreeNode *Current) {
-      for (DominatorTree::DomTreeNode::iterator I = Current->begin(),
+    void proceedToSuccessors(DomTreeNode *Current) {
+      for (DomTreeNode::iterator I = Current->begin(),
            E = Current->end(); I != E; ++I) {
         WorkList.push_back(*I);
       }
     }
 
-    void proceedToSuccessor(DominatorTree::DomTreeNode *Next) {
+    void proceedToSuccessor(DomTreeNode *Next) {
       WorkList.push_back(Next);
     }
 
     // Visits each instruction in the basic block.
-    void visitBasicBlock(DominatorTree::DomTreeNode *Node) {
+    void visitBasicBlock(DomTreeNode *Node) {
       BasicBlock *BB = Node->getBlock();
       ETNode *ET = Forest->getNodeForBlock(BB);
       DOUT << "Entering Basic Block: " << BB->getName()
@@ -2064,7 +2064,7 @@
 
     // Tries to simplify each Instruction and add new properties to
     // the PropertySet.
-    void visitInstruction(Instruction *I, DominatorTree::DomTreeNode *DT, ETNode *ET) {
+    void visitInstruction(Instruction *I, DomTreeNode *DT, ETNode *ET) {
       DOUT << "Considering instruction " << *I << "\n";
       DEBUG(IG->dump());
 
@@ -2132,7 +2132,7 @@
     WorkList.push_back(DT->getRootNode());
 
     do {
-      DominatorTree::DomTreeNode *DTNode = WorkList.back();
+      DomTreeNode *DTNode = WorkList.back();
       WorkList.pop_back();
       if (!UB.isDead(DTNode->getBlock())) visitBasicBlock(DTNode);
     } while (!WorkList.empty());
@@ -2164,7 +2164,7 @@
       return;
     }
 
-    for (DominatorTree::DomTreeNode::iterator I = DTNode->begin(), E = DTNode->end();
+    for (DomTreeNode::iterator I = DTNode->begin(), E = DTNode->end();
          I != E; ++I) {
       BasicBlock *Dest = (*I)->getBlock();
       DOUT << "Branch thinking about %" << Dest->getName()
@@ -2194,7 +2194,7 @@
     // Set the EQProperty in each of the cases BBs, and the NEProperties
     // in the default BB.
 
-    for (DominatorTree::DomTreeNode::iterator I = DTNode->begin(), E = DTNode->end();
+    for (DomTreeNode::iterator I = DTNode->begin(), E = DTNode->end();
          I != E; ++I) {
       BasicBlock *BB = (*I)->getBlock();
       DOUT << "Switch thinking about BB %" << BB->getName()






More information about the llvm-commits mailing list