Tabs -> Spaces
authorOwen Anderson <resistor@mac.com>
Sun, 15 Apr 2007 23:14:18 +0000 (23:14 +0000)
committerOwen Anderson <resistor@mac.com>
Sun, 15 Apr 2007 23:14:18 +0000 (23:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36094 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/Dominators.h
include/llvm/Analysis/PostDominators.h
lib/Analysis/PostDominators.cpp
lib/VMCore/Dominators.cpp

index c948a5fc7e8c5a8162cc391f64f5f86f56bdbff3..c550fe0d30816711c49f4d45992dd35e744acae0 100644 (file)
@@ -69,7 +69,7 @@ protected:
 
   Node *RootNode;
 
-       struct InfoRec {
+  struct InfoRec {
     unsigned Semi;
     unsigned Size;
     BasicBlock *Label, *Parent, *Child, *Ancestor;
@@ -213,7 +213,7 @@ public:
     return Roots[0];
   }
   
-       virtual bool runOnFunction(Function &F);
+  virtual bool runOnFunction(Function &F);
   
   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
     AU.setPreservesAll();
@@ -225,10 +225,10 @@ private:
   void Compress(BasicBlock *V, InfoRec &VInfo);
   BasicBlock *Eval(BasicBlock *v);
   void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo);
-       inline BasicBlock *getIDom(BasicBlock *BB) const {
-           std::map<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB);
-           return I != IDoms.end() ? I->second : 0;
-         }
+  inline BasicBlock *getIDom(BasicBlock *BB) const {
+      std::map<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB);
+      return I != IDoms.end() ? I->second : 0;
+    }
 };
 
 //===-------------------------------------
index 4997f93d09e8f09dd40787bb3c532289225fca06..359f19daf881f283397fab1e28b07d12f94bc21d 100644 (file)
@@ -37,14 +37,14 @@ private:
   void calculate(Function &F);
   Node *getNodeForBlock(BasicBlock *BB);
   unsigned DFSPass(BasicBlock *V, InfoRec &VInfo,unsigned N);
-       void Compress(BasicBlock *V, InfoRec &VInfo);
-       BasicBlock *Eval(BasicBlock *V);
-       void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo);
+  void Compress(BasicBlock *V, InfoRec &VInfo);
+  BasicBlock *Eval(BasicBlock *V);
+  void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo);
 
   inline BasicBlock *getIDom(BasicBlock *BB) const {
-         std::map<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB);
-         return I != IDoms.end() ? I->second : 0;
-       }
+    std::map<BasicBlock*, BasicBlock*>::const_iterator I = IDoms.find(BB);
+    return I != IDoms.end() ? I->second : 0;
+  }
 };
 
 
index 7351ed7a6abef61bd99720e6820de6c51d7bbe08..f93190c6861f14935fb8de9d25269535b2bf0611 100644 (file)
@@ -216,8 +216,8 @@ ETNode *PostETForest::getNodeForBlock(BasicBlock *BB) {
 
   // If we are unreachable, we may not have an immediate dominator.
   if (!node)
-               return 0;
-       else if (!node->getIDom())
+    return 0;
+  else if (!node->getIDom())
     return BBNode = new ETNode(BB);
   else {
     ETNode *IDomNode = getNodeForBlock(node->getIDom()->getBlock());
@@ -242,7 +242,7 @@ void PostETForest::calculate(const PostDominatorTree &DT) {
     ETNode *&BBNode = Nodes[BB];
     if (!BBNode) {  
       ETNode *IDomNode =  NULL;
-                       PostDominatorTree::Node *node = DT.getNode(BB);
+      PostDominatorTree::Node *node = DT.getNode(BB);
       if (node && node->getIDom())
         IDomNode = getNodeForBlock(node->getIDom()->getBlock());
 
index 9685ed9efae9f1dd8aba1a2edaffa15aad7b0be7..71eb3460e6c9eed342c43c358c1fd6f06f46196d 100644 (file)
@@ -210,8 +210,8 @@ void DominatorTree::Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo){
 }
 
 void DominatorTree::calculate(Function& F) {
-       BasicBlock* Root = Roots[0];
-       
+  BasicBlock* Root = Roots[0];
+  
   Nodes[Root] = RootNode = new Node(Root, 0); // Add a node for the root...
 
   Vertex.push_back(0);
@@ -260,7 +260,7 @@ void DominatorTree::calculate(Function& F) {
   // Loop over all of the reachable blocks in the function...
   for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I)
     if (BasicBlock *ImmDom = getIDom(I)) {  // Reachable block.
-                       Node *&BBNode = Nodes[I];
+      Node *&BBNode = Nodes[I];
       if (!BBNode) {  // Haven't calculated this node yet?
         // Get or calculate the node for the immediate dominator
         Node *IDomNode = getNodeForBlock(ImmDom);
@@ -273,7 +273,7 @@ void DominatorTree::calculate(Function& F) {
 
   // Free temporary memory used to construct idom's
   Info.clear();
-       IDoms.clear();
+  IDoms.clear();
   std::vector<BasicBlock*>().swap(Vertex);
 }
 
@@ -283,8 +283,8 @@ void DominatorTreeBase::reset() {
   for (NodeMapType::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I)
     delete I->second;
   Nodes.clear();
-       IDoms.clear();
-       Roots.clear();
+  IDoms.clear();
+  Roots.clear();
   RootNode = 0;
 }
 
@@ -343,7 +343,7 @@ void DominatorTreeBase::print(std::ostream &o, const Module* ) const {
 
 bool DominatorTree::runOnFunction(Function &F) {
   reset();     // Reset from the last time we were run...
-       Roots.push_back(&F.getEntryBlock());
+  Roots.push_back(&F.getEntryBlock());
   calculate(F);
   return false;
 }