Eliminate tabs and trailing spaces
authorJeff Cohen <jeffc@jolt-lang.org>
Sat, 23 Apr 2005 21:38:35 +0000 (21:38 +0000)
committerJeff Cohen <jeffc@jolt-lang.org>
Sat, 23 Apr 2005 21:38:35 +0000 (21:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21480 91177308-0d34-0410-b5e6-96231b3b80d8

17 files changed:
lib/Transforms/Instrumentation/EmitFunctions.cpp
lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp
lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp
lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp
lib/Transforms/Instrumentation/ProfilePaths/Graph.h
lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp
lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp
lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
lib/Transforms/Instrumentation/TraceValues.cpp
lib/Transforms/Scalar/ADCE.cpp
lib/Transforms/Scalar/InstructionCombining.cpp
lib/Transforms/Scalar/LoopUnroll.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Utils/CloneTrace.cpp
lib/VMCore/BasicBlock.cpp
lib/VMCore/Dominators.cpp

index 369a784a4e32a1a27844d244dcdc7628d05afa27..a49129399d2b0073d83057415fe66b3d59a9f4d9 100644 (file)
@@ -53,7 +53,7 @@ static char doDFS(BasicBlock * node,std::map<BasicBlock *, Color > &color){
 
     if(color[BB]!=GREY && color[BB]!=BLACK){
       if(!doDFS(BB, color)){
-       return 0;
+        return 0;
       }
     }
 
@@ -101,19 +101,19 @@ bool EmitFunctionTable::runOnModule(Module &M){
   M.getGlobalList().push_back(gb);
 
   Constant *constArray = ConstantArray::get(ArrayType::get(Type::SByteTy,
-                                                               sBCons.size()),
-                                                sBCons);
+                                                                sBCons.size()),
+                                                 sBCons);
 
   GlobalVariable *funcArray = new GlobalVariable(constArray->getType(), true,
-                                             GlobalValue::ExternalLinkage,
-                                             constArray, "llvmSimpleFunction");
+                                              GlobalValue::ExternalLinkage,
+                                              constArray, "llvmSimpleFunction");
 
   M.getGlobalList().push_back(funcArray);
 
   ConstantInt *cnst = ConstantSInt::get(Type::IntTy, counter);
   GlobalVariable *fnCount = new GlobalVariable(Type::IntTy, true,
-                                              GlobalValue::ExternalLinkage,
-                                              cnst, "llvmFunctionCount");
+                                               GlobalValue::ExternalLinkage,
+                                               cnst, "llvmFunctionCount");
   M.getGlobalList().push_back(fnCount);
   return true;  // Always modifies program
 }
index e592d28653337a231acc826a688d6827e16f7a78..5e4264ebfd5f39ae333d1e8c22b5c87b1eb28a85 100644 (file)
@@ -30,10 +30,10 @@ namespace {
     enum Color { WHITE, GREY, BLACK };
 
     void getBackEdgesVisit(BasicBlock *u,
-                          std::map<BasicBlock *, Color > &color,
-                          std::map<BasicBlock *, int > &d,
-                          int &time,
-                          std::map<BasicBlock *, BasicBlock *> &be);
+                           std::map<BasicBlock *, Color > &color,
+                           std::map<BasicBlock *, int > &d,
+                           int &time,
+                           std::map<BasicBlock *, BasicBlock *> &be);
     void removeRedundant(std::map<BasicBlock *, BasicBlock *> &be);
   public:
     bool runOnFunction(Function &F);
@@ -55,7 +55,7 @@ void CombineBranches::getBackEdgesVisit(BasicBlock *u,
                        std::map<BasicBlock *, Color > &color,
                        std::map<BasicBlock *, int > &d,
                        int &time,
-                      std::map<BasicBlock *, BasicBlock *> &be) {
+                       std::map<BasicBlock *, BasicBlock *> &be) {
 
   color[u]=GREY;
   time++;
@@ -71,7 +71,7 @@ void CombineBranches::getBackEdgesVisit(BasicBlock *u,
     else if(color[BB]==GREY){
       //so v is ancestor of u if time of u > time of v
       if(d[u] >= d[BB]) // u->BB is a backedge
-       be[u] = BB;
+        be[u] = BB;
     }
   }
   color[u]=BLACK;//done with visiting the node and its neighbors
@@ -85,7 +85,7 @@ void CombineBranches::removeRedundant(std::map<BasicBlock *, BasicBlock *> &be){
   std::map<BasicBlock *, int> seenBB;
 
   for(std::map<BasicBlock *, BasicBlock *>::iterator MI = be.begin(),
-       ME = be.end(); MI != ME; ++MI){
+        ME = be.end(); MI != ME; ++MI){
 
     if(seenBB[MI->second])
       continue;
@@ -96,13 +96,13 @@ void CombineBranches::removeRedundant(std::map<BasicBlock *, BasicBlock *> &be){
     sameTarget.clear();
 
     for(std::map<BasicBlock *, BasicBlock *>::iterator MMI = be.begin(),
-         MME = be.end(); MMI != MME; ++MMI){
+          MME = be.end(); MMI != MME; ++MMI){
 
       if(MMI->first == MI->first)
-       continue;
+        continue;
 
       if(MMI->second == MI->second)
-       sameTarget.push_back(MMI->first);
+        sameTarget.push_back(MMI->first);
 
     }
 
@@ -117,49 +117,49 @@ void CombineBranches::removeRedundant(std::map<BasicBlock *, BasicBlock *> &be){
       std::map<PHINode *, std::vector<unsigned int> > phiMap;
 
       for(std::vector<BasicBlock *>::iterator VBI = sameTarget.begin(),
-           VBE = sameTarget.end(); VBI != VBE; ++VBI){
-
-       BranchInst *ti = cast<BranchInst>((*VBI)->getTerminator());
-       unsigned char index = 1;
-       if(ti->getSuccessor(0) == MI->second)
-         index = 0;
-
-       ti->setSuccessor(index, newBB);
-
-       for(BasicBlock::iterator BB2Inst = MI->second->begin(),
-             BBend = MI->second->end(); BB2Inst != BBend; ++BB2Inst){
-       
-         if (PHINode *phiInst = dyn_cast<PHINode>(BB2Inst)){
-           int bbIndex;
-           bbIndex = phiInst->getBasicBlockIndex(*VBI);
-           if(bbIndex>=0)
-             phiMap[phiInst].push_back(bbIndex);
-         }
-       }
+            VBE = sameTarget.end(); VBI != VBE; ++VBI){
+
+        BranchInst *ti = cast<BranchInst>((*VBI)->getTerminator());
+        unsigned char index = 1;
+        if(ti->getSuccessor(0) == MI->second)
+          index = 0;
+
+        ti->setSuccessor(index, newBB);
+
+        for(BasicBlock::iterator BB2Inst = MI->second->begin(),
+              BBend = MI->second->end(); BB2Inst != BBend; ++BB2Inst){
+
+          if (PHINode *phiInst = dyn_cast<PHINode>(BB2Inst)){
+            int bbIndex;
+            bbIndex = phiInst->getBasicBlockIndex(*VBI);
+            if(bbIndex>=0)
+              phiMap[phiInst].push_back(bbIndex);
+          }
+        }
       }
 
       for(std::map<PHINode *, std::vector<unsigned int> >::iterator
-           PI = phiMap.begin(), PE = phiMap.end(); PI != PE; ++PI){
-       
-       PHINode *phiNode = new PHINode(PI->first->getType(), "phi", newBranch);
-       for(std::vector<unsigned int>::iterator II = PI->second.begin(),
-             IE = PI->second.end(); II != IE; ++II){
-         phiNode->addIncoming(PI->first->getIncomingValue(*II),
-                              PI->first->getIncomingBlock(*II));
-       }
-
-       std::vector<BasicBlock *> tempBB;
-       for(std::vector<unsigned int>::iterator II = PI->second.begin(),
-             IE = PI->second.end(); II != IE; ++II){
-         tempBB.push_back(PI->first->getIncomingBlock(*II));
-       }
-
-       for(std::vector<BasicBlock *>::iterator II = tempBB.begin(),
-             IE = tempBB.end(); II != IE; ++II){
-         PI->first->removeIncomingValue(*II);
-       }
-
-       PI->first->addIncoming(phiNode, newBB);
+            PI = phiMap.begin(), PE = phiMap.end(); PI != PE; ++PI){
+
+        PHINode *phiNode = new PHINode(PI->first->getType(), "phi", newBranch);
+        for(std::vector<unsigned int>::iterator II = PI->second.begin(),
+              IE = PI->second.end(); II != IE; ++II){
+          phiNode->addIncoming(PI->first->getIncomingValue(*II),
+                               PI->first->getIncomingBlock(*II));
+        }
+
+        std::vector<BasicBlock *> tempBB;
+        for(std::vector<unsigned int>::iterator II = PI->second.begin(),
+              IE = PI->second.end(); II != IE; ++II){
+          tempBB.push_back(PI->first->getIncomingBlock(*II));
+        }
+
+        for(std::vector<BasicBlock *>::iterator II = tempBB.begin(),
+              IE = tempBB.end(); II != IE; ++II){
+          PI->first->removeIncomingValue(*II);
+        }
+
+        PI->first->addIncoming(phiNode, newBB);
       }
     }
   }
index aef4681f305bdec17401d6a99446e7a9f3f15810..95822df002a7b332848610ed345bdf2966e5b84f 100644 (file)
@@ -59,7 +59,7 @@ static void getTriggerCode(Module *M, BasicBlock *BB, int MethNo, Value *pathNo,
 //get the code to be inserted on the edge
 //This is determined from cond (1-6)
 void getEdgeCode::getCode(Instruction *rInst, Value *countInst,
-                         Function *M, BasicBlock *BB,
+                          Function *M, BasicBlock *BB,
                           vector<Value *> &retVec){
 
   //Instruction *InsertPos = BB->getInstList().begin();
@@ -143,7 +143,7 @@ void getEdgeCode::getCode(Instruction *rInst, Value *countInst,
     retVec.push_back(trAddIndex);
     //insert trigger
     //getTriggerCode(M->getParent(), BB, MethNo,
-    //    ConstantSInt::get(Type::IntTy,inc), newCount, triggerInst);
+    //     ConstantSInt::get(Type::IntTy,inc), newCount, triggerInst);
     //end trigger code
 
     assert(inc>=0 && "IT MUST BE POSITIVE NOW");
@@ -164,7 +164,7 @@ void getEdgeCode::getCode(Instruction *rInst, Value *countInst,
 
     //now load count[addIndex]
     Instruction *castInst=new CastInst(addIndex,
-                                      Type::LongTy,"ctin");//, InsertPos);
+                                       Type::LongTy,"ctin");//, InsertPos);
     BB->getInstList().push_back(castInst);
 
     vector<Value *> tmpVec;
@@ -252,8 +252,8 @@ void getEdgeCode::getCode(Instruction *rInst, Value *countInst,
 //Count is an array, where Count[k] represents
 //the number of executions of path k
 void insertInTopBB(BasicBlock *front,
-                  int k,
-                  Instruction *rVar, Value *threshold){
+                   int k,
+                   Instruction *rVar, Value *threshold){
   //rVar is variable r,
   //countVar is count[]
 
@@ -281,10 +281,10 @@ void insertInTopBB(BasicBlock *front,
 //insert a basic block with appropriate code
 //along a given edge
 void insertBB(Edge ed,
-             getEdgeCode *edgeCode,
-             Instruction *rInst,
-             Value *countInst,
-             int numPaths, int Methno, Value *threshold){
+              getEdgeCode *edgeCode,
+              Instruction *rInst,
+              Value *countInst,
+              int numPaths, int Methno, Value *threshold){
 
   BasicBlock* BB1=ed.getFirst()->getElement();
   BasicBlock* BB2=ed.getSecond()->getElement();
index 21883c41b0cdf0fd74695ae1d8c06476ed2e2eef..c8b1a0dfce054d0bf9901449e41258413e9414f6 100644 (file)
@@ -22,7 +22,7 @@ using std::vector;
 namespace llvm {
 
 const graphListElement *findNodeInList(const Graph::nodeList &NL,
-                                             Node *N) {
+                                       Node *N) {
   for(Graph::nodeList::const_iterator NI = NL.begin(), NE=NL.end(); NI != NE;
       ++NI)
     if (*NI->element== *N)
@@ -39,7 +39,7 @@ graphListElement *findNodeInList(Graph::nodeList &NL, Node *N) {
 
 //graph constructor with root and exit specified
 Graph::Graph(std::vector<Node*> n, std::vector<Edge> e,
-            Node *rt, Node *lt){
+             Node *rt, Node *lt){
   strt=rt;
   ext=lt;
   for(vector<Node* >::iterator x=n.begin(), en=n.end(); x!=en; ++x)
@@ -297,9 +297,9 @@ int Graph::getNumberOfIncomingEdges(Node *nd){
     Node *lnode=EI->first;
     const nodeList &nl = getNodeList(lnode);
     for(Graph::nodeList::const_iterator NI = nl.begin(), NE=nl.end(); NI != NE;
-       ++NI)
+        ++NI)
       if (*NI->element== *nd)
-       count++;
+        count++;
   }
   return count;
 }
@@ -400,8 +400,8 @@ Graph* Graph::getMaxSpanningTree(){
     //remove u frm vt
     for(vector<Node *>::iterator VI=vt.begin(), VE=vt.end(); VI!=VE; ++VI){
       if(**VI==*u){
-       vt.erase(VI);
-       break;
+        vt.erase(VI);
+        break;
       }
     }
 
@@ -414,10 +414,10 @@ Graph* Graph::getMaxSpanningTree(){
       //check if v is in vt
       bool contains=false;
       for(vector<Node *>::iterator VI=vt.begin(), VE=vt.end(); VI!=VE; ++VI){
-       if(**VI==*v){
-         contains=true;
-         break;
-       }
+        if(**VI==*v){
+          contains=true;
+          break;
+        }
       }
       DEBUG(std::cerr<<"wt:v->wt"<<weight<<":"<<v->getWeight()<<"\n";
             printNode(v);std::cerr<<"node wt:"<<(*v).weight<<"\n");
@@ -425,11 +425,11 @@ Graph* Graph::getMaxSpanningTree(){
       //so if v in in vt, change wt(v) to wt(u->v)
       //only if wt(u->v)<wt(v)
       if(contains && weight<v->getWeight()){
-       parent[v]=u;
-       ed_weight[v]=weight;
-       v->setWeight(weight);
+        parent[v]=u;
+        ed_weight[v]=weight;
+        v->setWeight(weight);
 
-       DEBUG(std::cerr<<v->getWeight()<<":Set weight------\n";
+        DEBUG(std::cerr<<v->getWeight()<<":Set weight------\n";
               printGraph();
               printEdge(Edge(u,v,weight)));
       }
@@ -447,7 +447,7 @@ void Graph::printGraph(){
      Graph::nodeList &nl = getNodeList(*LI);
      for(Graph::nodeList::iterator NI=nl.begin(), NE=nl.end(); NI!=NE; ++NI){
        std::cerr<<":"<<"("<<(NI->element->getElement())
-        ->getName()<<":"<<NI->element->getWeight()<<","<<NI->weight<<")";
+         ->getName()<<":"<<NI->element->getWeight()<<","<<NI->weight<<")";
      }
      std::cerr<<"--------\n";
    }
@@ -494,9 +494,9 @@ void Graph::makeUnDirectional(){
     for(nodeList::iterator NLI=nl.begin(), NLE=nl.end(); NLI!=NLE; ++NLI){
       Edge ed(NLI->element, *NI, NLI->weight);
       if(!hasEdgeAndWt(ed)){
-       DEBUG(std::cerr<<"######doesn't hv\n";
+        DEBUG(std::cerr<<"######doesn't hv\n";
               printEdge(ed));
-       addEdgeForce(ed);
+        addEdgeForce(ed);
       }
     }
   }
@@ -511,7 +511,7 @@ void Graph::reverseWts(){
       ++NI) {
     nodeList &node_list = getNodeList(*NI);
     for(nodeList::iterator NLI=nodes[*NI].begin(), NLE=nodes[*NI].end();
-       NLI!=NLE; ++NLI)
+        NLI!=NLE; ++NLI)
       NLI->weight=-NLI->weight;
   }
 }
@@ -538,8 +538,8 @@ void Graph::getBackEdges(vector<Edge > &be, std::map<Node *, int> &d){
 //helper function to get back edges: it is called by
 //the "getBackEdges" function above
 void Graph::getBackEdgesVisit(Node *u, vector<Edge > &be,
-                             std::map<Node *, Color > &color,
-                             std::map<Node *, int > &d, int &time) {
+                              std::map<Node *, Color > &color,
+                              std::map<Node *, int > &d, int &time) {
   color[u]=GREY;
   time++;
   d[u]=time;
@@ -547,7 +547,7 @@ void Graph::getBackEdgesVisit(Node *u, vector<Edge > &be,
   vector<graphListElement> &succ_list = getNodeList(u);
 
   for(vector<graphListElement>::iterator vl=succ_list.begin(),
-       ve=succ_list.end(); vl!=ve; ++vl){
+        ve=succ_list.end(); vl!=ve; ++vl){
     Node *v=vl->element;
     if(color[v]!=GREY && color[v]!=BLACK){
       getBackEdgesVisit(v, be, color, d, time);
@@ -557,9 +557,9 @@ void Graph::getBackEdgesVisit(Node *u, vector<Edge > &be,
     if(color[v]==GREY){
       //so v is ancestor of u if time of u > time of v
       if(d[u] >= d[v]){
-       Edge *ed=new Edge(u, v,vl->weight, vl->randId);
-       if (!(*u == *getExit() && *v == *getRoot()))
-         be.push_back(*ed);      // choose the forward edges
+        Edge *ed=new Edge(u, v,vl->weight, vl->randId);
+        if (!(*u == *getExit() && *v == *getRoot()))
+          be.push_back(*ed);      // choose the forward edges
       }
     }
   }
index 203948454c7ef17f35f7e1caf8e7c26d8165aac4..9782ab49172aa0c5b10c63818ae3520f9b93878e 100644 (file)
@@ -233,10 +233,10 @@ private:
   //So we have a back edge when we meet a successor of
   //a node with smaller time, and GREY color
   void getBackEdgesVisit(Node *u,
-                        std::vector<Edge > &be,
-                        std::map<Node *, Color> &clr,
-                        std::map<Node *, int> &d,
-                        int &time);
+                         std::vector<Edge > &be,
+                         std::map<Node *, Color> &clr,
+                         std::map<Node *, int> &d,
+                         int &time);
 
 public:
   typedef nodeMapTy::iterator elementIterator;
@@ -251,7 +251,7 @@ public:
 
   //constructor with root and exit node specified
   Graph(std::vector<Node*> n,
-       std::vector<Edge> e, Node *rt, Node *lt);
+        std::vector<Edge> e, Node *rt, Node *lt);
 
   //add a node
   void addNode(Node *nd);
index bd7bf4fe9e0009b9f2656fbb29e86cae17e21b1d..4ca1c5b92feda8df056425bf8864a8b50a8d56d9 100644 (file)
@@ -40,10 +40,10 @@ static void getChords(vector<Edge > &chords, Graph &g, Graph st){
       ++NI){
     Graph::nodeList node_list=g.getNodeList(*NI);
     for(Graph::nodeList::iterator NLI=node_list.begin(), NLE=node_list.end();
-       NLI!=NLE; ++NLI){
+        NLI!=NLE; ++NLI){
       Edge f(*NI, NLI->element,NLI->weight, NLI->randId);
       if(!(st.hasEdgeAndWt(f)))//addnl
-       chords.push_back(f);
+        chords.push_back(f);
     }
   }
 }
@@ -60,7 +60,7 @@ static void removeTreeEdges(Graph &g, Graph& t){
   for(vector<Node *>::iterator NI=allNodes.begin(), NE=allNodes.end(); NI!=NE;
       ++NI){
     Graph::nodeList nl=t.getNodeList(*NI);
-    for(Graph::nodeList::iterator NLI=nl.begin(), NLE=nl.end();        NLI!=NLE;++NLI){
+    for(Graph::nodeList::iterator NLI=nl.begin(), NLE=nl.end(); NLI!=NLE;++NLI){
       Edge ed(NLI->element, *NI, NLI->weight);
       if(!g.hasEdgeAndWt(ed)) t.removeEdge(ed);//tree has only one edge
       //between any pair of vertices, so no need to delete by edge wt
@@ -91,8 +91,8 @@ int valueAssignmentToEdges(Graph& g,  map<Node *, int> nodePriority,
       int sz=nlist.size();
 
       for(int i=0;i<sz-1; i++){
-       int min=i;
-       for(int j=i+1; j<sz; j++){
+        int min=i;
+        for(int j=i+1; j<sz; j++){
           BasicBlock *bb1 = nlist[j].element->getElement();
           BasicBlock *bb2 = nlist[min].element->getElement();
 
@@ -123,16 +123,16 @@ int valueAssignmentToEdges(Graph& g,  map<Node *, int> nodePriority,
           }
 
         }
-       graphListElement tempEl=nlist[min];
-       nlist[min]=nlist[i];
-       nlist[i]=tempEl;
+        graphListElement tempEl=nlist[min];
+        nlist[min]=nlist[i];
+        nlist[i]=tempEl;
       }
 
       //sorted now!
       for(Graph::nodeList::iterator GLI=nlist.begin(), GLE=nlist.end();
-         GLI!=GLE; ++GLI){
-               GLI->weight=NumPaths[*RI];
-       NumPaths[*RI]+=NumPaths[GLI->element];
+          GLI!=GLE; ++GLI){
+        GLI->weight=NumPaths[*RI];
+        NumPaths[*RI]+=NumPaths[GLI->element];
       }
     }
   }
@@ -154,9 +154,9 @@ static int inc_Dir(Edge e, Edge f){
 
  //check that the edges must have at least one common endpoint
   assert(*(e.getFirst())==*(f.getFirst()) ||
-        *(e.getFirst())==*(f.getSecond()) ||
-        *(e.getSecond())==*(f.getFirst()) ||
-        *(e.getSecond())==*(f.getSecond()));
+         *(e.getFirst())==*(f.getSecond()) ||
+         *(e.getSecond())==*(f.getFirst()) ||
+         *(e.getSecond())==*(f.getSecond()));
 
   if(*(e.getFirst())==*(f.getSecond()) ||
      *(e.getSecond())==*(f.getFirst()))
@@ -169,7 +169,7 @@ static int inc_Dir(Edge e, Edge f){
 //used for getting edge increments (read comments above in inc_Dir)
 //inc_DFS is a modification of DFS
 static void inc_DFS(Graph& g,Graph& t,map<Edge, int, EdgeCompare2>& Increment,
-            int events, Node *v, Edge e){
+             int events, Node *v, Edge e){
 
   vector<Node *> allNodes=t.getAllNodes();
 
@@ -177,12 +177,12 @@ static void inc_DFS(Graph& g,Graph& t,map<Edge, int, EdgeCompare2>& Increment,
       ++NI){
     Graph::nodeList node_list=t.getNodeList(*NI);
     for(Graph::nodeList::iterator NLI=node_list.begin(), NLE=node_list.end();
-       NLI!= NLE; ++NLI){
+        NLI!= NLE; ++NLI){
       Edge f(*NI, NLI->element,NLI->weight, NLI->randId);
       if(!edgesEqual(f,e) && *v==*(f.getSecond())){
-       int dir_count=inc_Dir(e,f);
-       int wt=1*f.getWeight();
-       inc_DFS(g,t, Increment, dir_count*events+wt, f.getFirst(), f);
+        int dir_count=inc_Dir(e,f);
+        int wt=1*f.getWeight();
+        inc_DFS(g,t, Increment, dir_count*events+wt, f.getFirst(), f);
       }
     }
   }
@@ -191,13 +191,13 @@ static void inc_DFS(Graph& g,Graph& t,map<Edge, int, EdgeCompare2>& Increment,
       ++NI){
     Graph::nodeList node_list=t.getNodeList(*NI);
     for(Graph::nodeList::iterator NLI=node_list.begin(), NLE=node_list.end();
-       NLI!=NLE; ++NLI){
+        NLI!=NLE; ++NLI){
       Edge f(*NI, NLI->element,NLI->weight, NLI->randId);
       if(!edgesEqual(f,e) && *v==*(f.getFirst())){
-       int dir_count=inc_Dir(e,f);
-       int wt=f.getWeight();
-       inc_DFS(g,t, Increment, dir_count*events+wt,
-               f.getSecond(), f);
+        int dir_count=inc_Dir(e,f);
+        int wt=f.getWeight();
+        inc_DFS(g,t, Increment, dir_count*events+wt,
+                f.getSecond(), f);
       }
     }
   }
@@ -207,12 +207,12 @@ static void inc_DFS(Graph& g,Graph& t,map<Edge, int, EdgeCompare2>& Increment,
       ++NI){
     Graph::nodeList node_list=g.getNodeList(*NI);
     for(Graph::nodeList::iterator NLI=node_list.begin(), NLE=node_list.end();
-       NLI!=NLE; ++NLI){
+        NLI!=NLE; ++NLI){
       Edge f(*NI, NLI->element,NLI->weight, NLI->randId);
       if(!(t.hasEdgeAndWt(f)) && (*v==*(f.getSecond()) ||
-                                 *v==*(f.getFirst()))){
-       int dir_count=inc_Dir(e,f);
-       Increment[f]+=dir_count*events;
+                                  *v==*(f.getFirst()))){
+        int dir_count=inc_Dir(e,f);
+        Increment[f]+=dir_count*events;
       }
     }
   }
@@ -234,10 +234,10 @@ static map<Edge, int, EdgeCompare2> getEdgeIncrements(Graph& g, Graph& t,
     Graph::nodeList node_list=g.getSortedNodeList(*NI, be);
     //modified g.getNodeList(*NI);
     for(Graph::nodeList::iterator NLI=node_list.begin(), NLE=node_list.end();
-       NLI!=NLE; ++NLI){
+        NLI!=NLE; ++NLI){
       Edge ed(*NI, NLI->element,NLI->weight,NLI->randId);
       if(!(t.hasEdgeAndWt(ed))){
-       Increment[ed]=0;;
+        Increment[ed]=0;;
       }
     }
   }
@@ -250,11 +250,11 @@ static map<Edge, int, EdgeCompare2> getEdgeIncrements(Graph& g, Graph& t,
     Graph::nodeList node_list=g.getSortedNodeList(*NI, be);
     //modified g.getNodeList(*NI);
     for(Graph::nodeList::iterator NLI=node_list.begin(), NLE=node_list.end();
-       NLI!=NLE; ++NLI){
+        NLI!=NLE; ++NLI){
       Edge ed(*NI, NLI->element,NLI->weight, NLI->randId);
       if(!(t.hasEdgeAndWt(ed))){
-       int wt=ed.getWeight();
-       Increment[ed]+=wt;
+        int wt=ed.getWeight();
+        Increment[ed]+=wt;
       }
     }
   }
@@ -264,7 +264,7 @@ static map<Edge, int, EdgeCompare2> getEdgeIncrements(Graph& g, Graph& t,
 
 //push it up: TODO
 const graphListElement *findNodeInList(const Graph::nodeList &NL,
-                                             Node *N);
+                                              Node *N);
 
 graphListElement *findNodeInList(Graph::nodeList &NL, Node *N);
 //end TODO
@@ -287,33 +287,33 @@ static void getCodeInsertions(Graph &g, map<Edge, getEdgeCode *, EdgeCompare2> &
     Graph::nodeList succs=g.getNodeList(v);
 
     for(Graph::nodeList::iterator nl=succs.begin(), ne=succs.end();
-       nl!=ne; ++nl){
+        nl!=ne; ++nl){
       int edgeWt=nl->weight;
       Node *w=nl->element;
       //if chords has v->w
       Edge ed(v,w, edgeWt, nl->randId);
       bool hasEdge=false;
       for(vector<Edge>::iterator CI=chords.begin(), CE=chords.end();
-         CI!=CE && !hasEdge;++CI){
-       if(*CI==ed && CI->getWeight()==edgeWt){//modf
-         hasEdge=true;
-       }
+          CI!=CE && !hasEdge;++CI){
+        if(*CI==ed && CI->getWeight()==edgeWt){//modf
+          hasEdge=true;
+        }
       }
 
       if(hasEdge){//so its a chord edge
-       getEdgeCode *edCd=new getEdgeCode();
-       edCd->setCond(1);
-       edCd->setInc(edIncrements[ed]);
-       instr[ed]=edCd;
+        getEdgeCode *edCd=new getEdgeCode();
+        edCd->setCond(1);
+        edCd->setInc(edIncrements[ed]);
+        instr[ed]=edCd;
       }
       else if(g.getNumberOfIncomingEdges(w)==1){
-       ws.push_back(w);
+        ws.push_back(w);
       }
       else{
-       getEdgeCode *edCd=new getEdgeCode();
-       edCd->setCond(2);
-       edCd->setInc(0);
-       instr[ed]=edCd;
+        getEdgeCode *edCd=new getEdgeCode();
+        edCd->setCond(2);
+        edCd->setInc(0);
+        instr[ed]=edCd;
       }
     }
   }
@@ -335,7 +335,7 @@ static void getCodeInsertions(Graph &g, map<Edge, getEdgeCode *, EdgeCompare2> &
       //graphListElement *N = findNodeInList(nl, w);
       for(Graph::nodeList::const_iterator N = nl.begin(),
             NNEN = nl.end(); N!= NNEN; ++N){
-        if (*N->element == *w){        
+        if (*N->element == *w){
           Node *v=lnode;
 
           //if chords has v->w
@@ -388,8 +388,8 @@ static void getCodeInsertions(Graph &g, map<Edge, getEdgeCode *, EdgeCompare2> &
 //and outgoing dummy edge is a->exit
 //changed
 void addDummyEdges(vector<Edge > &stDummy,
-                  vector<Edge > &exDummy,
-                  Graph &g, vector<Edge> &be){
+                   vector<Edge > &exDummy,
+                   Graph &g, vector<Edge> &be){
   for(vector<Edge >::iterator VI=be.begin(), VE=be.end(); VI!=VE; ++VI){
     Edge ed=*VI;
     Node *first=ed.getFirst();
@@ -414,7 +414,7 @@ void addDummyEdges(vector<Edge > &stDummy,
 void printEdge(Edge ed){
   cerr<<((ed.getFirst())->getElement())
     ->getName()<<"->"<<((ed.getSecond())
-                         ->getElement())->getName()<<
+                          ->getElement())->getName()<<
     ":"<<ed.getWeight()<<" rndId::"<<ed.getRandId()<<"\n";
 }
 
@@ -424,14 +424,14 @@ static void moveDummyCode(vector<Edge> &stDummy,
                           vector<Edge> &exDummy,
                           vector<Edge> &be,
                           map<Edge, getEdgeCode *, EdgeCompare2> &insertions,
-                         Graph &g){
+                          Graph &g){
   typedef vector<Edge >::iterator vec_iter;
 
   map<Edge,getEdgeCode *, EdgeCompare2> temp;
   //iterate over edges with code
   std::vector<Edge> toErase;
   for(map<Edge,getEdgeCode *, EdgeCompare2>::iterator MI=insertions.begin(),
-       ME=insertions.end(); MI!=ME; ++MI){
+        ME=insertions.end(); MI!=ME; ++MI){
     Edge ed=MI->first;
     getEdgeCode *edCd=MI->second;
 
@@ -439,26 +439,26 @@ static void moveDummyCode(vector<Edge> &stDummy,
     //iterate over be, and check if its starts and end vertices hv code
     for(vector<Edge>::iterator BEI=be.begin(), BEE=be.end(); BEI!=BEE; ++BEI){
       if(ed.getRandId()==BEI->getRandId()){
-       
-       if(temp[*BEI]==0)
-         temp[*BEI]=new getEdgeCode();
-       
-       //so ed is either in st, or ex!
-       if(ed.getFirst()==g.getRoot()){
-
-         //so its in stDummy
-         temp[*BEI]->setCdIn(edCd);
-         toErase.push_back(ed);
-       }
-       else if(ed.getSecond()==g.getExit()){
-
-         //so its in exDummy
-         toErase.push_back(ed);
-         temp[*BEI]->setCdOut(edCd);
-       }
-       else{
-         assert(false && "Not found in either start or end! Rand failed?");
-       }
+
+        if(temp[*BEI]==0)
+          temp[*BEI]=new getEdgeCode();
+
+        //so ed is either in st, or ex!
+        if(ed.getFirst()==g.getRoot()){
+
+          //so its in stDummy
+          temp[*BEI]->setCdIn(edCd);
+          toErase.push_back(ed);
+        }
+        else if(ed.getSecond()==g.getExit()){
+
+          //so its in exDummy
+          toErase.push_back(ed);
+          temp[*BEI]->setCdOut(edCd);
+        }
+        else{
+          assert(false && "Not found in either start or end! Rand failed?");
+        }
       }
     }
   }
@@ -485,12 +485,12 @@ static void moveDummyCode(vector<Edge> &stDummy,
 //appropriate code insertions etc and insert the code at
 //appropriate locations
 void processGraph(Graph &g,
-                 Instruction *rInst,
-                 Value *countInst,
-                 vector<Edge >& be,
-                 vector<Edge >& stDummy,
-                 vector<Edge >& exDummy,
-                 int numPaths, int MethNo,
+                  Instruction *rInst,
+                  Value *countInst,
+                  vector<Edge >& be,
+                  vector<Edge >& stDummy,
+                  vector<Edge >& exDummy,
+                  int numPaths, int MethNo,
                   Value *threshold){
 
   //Given a graph: with exit->root edge, do the following in seq:
@@ -621,7 +621,7 @@ void processGraph(Graph &g,
   //print edges with code for debugging
   cerr<<"Code inserted in following---------------\n";
   for(map<Edge, getEdgeCode *, EdgeCompare2>::iterator cd_i=codeInsertions.begin(),
-       cd_e=codeInsertions.end(); cd_i!=cd_e; ++cd_i){
+        cd_e=codeInsertions.end(); cd_i!=cd_e; ++cd_i){
     printEdge(cd_i->first);
     cerr<<cd_i->second->getCond()<<":"<<cd_i->second->getInc()<<"\n";
   }
@@ -639,10 +639,10 @@ void processGraph(Graph &g,
   //debugging info
   cerr<<"After moving dummy code\n";
   for(map<Edge, getEdgeCode *,EdgeCompare2>::iterator cd_i=codeInsertions.begin(),
-       cd_e=codeInsertions.end(); cd_i != cd_e; ++cd_i){
+        cd_e=codeInsertions.end(); cd_i != cd_e; ++cd_i){
     printEdge(cd_i->first);
     cerr<<cd_i->second->getCond()<<":"
-       <<cd_i->second->getInc()<<"\n";
+        <<cd_i->second->getInc()<<"\n";
   }
   cerr<<"Dummy end------------\n";
 #endif
@@ -651,7 +651,7 @@ void processGraph(Graph &g,
   //see what it looks like...
   //now insert code along edges which have codes on them
   for(map<Edge, getEdgeCode *,EdgeCompare2>::iterator MI=codeInsertions.begin(),
-       ME=codeInsertions.end(); MI!=ME; ++MI){
+        ME=codeInsertions.end(); MI!=ME; ++MI){
     Edge ed=MI->first;
     insertBB(ed, MI->second, rInst, countInst, numPaths, MethNo, threshold);
   }
@@ -666,10 +666,10 @@ void printGraph(Graph &g){
     cerr<<((*LI)->getElement())->getName()<<"->";
     Graph::nodeList nl=g.getNodeList(*LI);
     for(Graph::nodeList::iterator NI=nl.begin();
-       NI!=nl.end(); ++NI){
+        NI!=nl.end(); ++NI){
       cerr<<":"<<"("<<(NI->element->getElement())
-       ->getName()<<":"<<NI->element->getWeight()<<","<<NI->weight<<","
-         <<NI->randId<<")";
+        ->getName()<<":"<<NI->element->getWeight()<<","<<NI->weight<<","
+          <<NI->randId<<")";
     }
     cerr<<"\n";
   }
index fc828977f68b490f4731473bdf585231bb02742f..860b57f7e4fcd7bdde0edc1e62cb6391630deba4 100644 (file)
@@ -45,9 +45,9 @@ namespace {
     Function *inCountMth;
     DominatorSet *DS;
     void getBackEdgesVisit(BasicBlock *u,
-                          std::map<BasicBlock *, Color > &color,
-                          std::map<BasicBlock *, int > &d,
-                          int &time, BBMap &be);
+                           std::map<BasicBlock *, Color > &color,
+                           std::map<BasicBlock *, int > &d,
+                           int &time, BBMap &be);
     void removeRedundant(BBMap &be);
     void findAndInstrumentBackEdges(Function &F);
   public:
@@ -79,8 +79,8 @@ void InstLoops::getBackEdgesVisit(BasicBlock *u,
     else if(color[BB]==GREY){
       //so v is ancestor of u if time of u > time of v
       if(d[u] >= d[BB]){
-       //u->BB is a backedge
-       be[u] = BB;
+        //u->BB is a backedge
+        be[u] = BB;
       }
     }
   }
@@ -92,13 +92,13 @@ void InstLoops::getBackEdgesVisit(BasicBlock *u,
 void InstLoops::removeRedundant(BBMap &be) {
   std::vector<BasicBlock *> toDelete;
   for(std::map<BasicBlock *, BasicBlock *>::iterator MI = be.begin(),
-       ME = be.end(); MI != ME; ++MI)
+        ME = be.end(); MI != ME; ++MI)
     for(BBMap::iterator MMI = be.begin(), MME = be.end(); MMI != MME; ++MMI)
       if(DS->properlyDominates(MI->first, MMI->first))
-       toDelete.push_back(MMI->first);
+        toDelete.push_back(MMI->first);
   // Remove all the back-edges we found from be.
   for(std::vector<BasicBlock *>::iterator VI = toDelete.begin(),
-       VE = toDelete.end(); VI != VE; ++VI)
+        VE = toDelete.end(); VI != VE; ++VI)
     be.erase(*VI);
 }
 
@@ -123,7 +123,7 @@ void InstLoops::findAndInstrumentBackEdges(Function &F){
   removeRedundant(be);
 
   for(std::map<BasicBlock *, BasicBlock *>::iterator MI = be.begin(),
-       ME = be.end(); MI != ME; ++MI){
+        ME = be.end(); MI != ME; ++MI){
     BasicBlock *u = MI->first;
     BasicBlock *BB = MI->second;
     // We have a back-edge from BB --> u.
index c92094015de71117beca26547645a17c262ee9a1..8c343df8f690081d6e06bd3bdf6d64d4a1146772 100644 (file)
@@ -26,9 +26,9 @@ namespace llvm {
 //Routines to get the path trace!
 
 void getPathFrmNode(Node *n, vector<BasicBlock*> &vBB, int pathNo, Graph &g,
-                   vector<Edge> &stDummy, vector<Edge> &exDummy,
-                   vector<Edge> &be,
-                   double strand){
+                    vector<Edge> &stDummy, vector<Edge> &exDummy,
+                    vector<Edge> &be,
+                    double strand){
   Graph::nodeList &nlist = g.getNodeList(n);
 
   //printGraph(g);
@@ -48,7 +48,7 @@ void getPathFrmNode(Node *n, vector<BasicBlock*> &vBB, int pathNo, Graph &g,
       nextRoot=NLI->element;
       edgeRnd=NLI->randId;
       if(isStart)
-       strand=NLI->randId;
+        strand=NLI->randId;
     }
   }
 
@@ -66,43 +66,43 @@ void getPathFrmNode(Node *n, vector<BasicBlock*> &vBB, int pathNo, Graph &g,
     bool has1=false, has2=false;
     //check if exit has it
     for(vector<Edge>::iterator VI=exDummy.begin(), VE=exDummy.end(); VI!=VE;
-       ++VI){
+        ++VI){
       if(VI->getRandId()==edgeRnd){
-       has2=true;
-       break;
+        has2=true;
+        break;
       }
     }
 
     //check if start has it
     for(vector<Edge>::iterator VI=stDummy.begin(), VE=stDummy.end(); VI!=VE;
-       ++VI){
+        ++VI){
       if(VI->getRandId()==strand){
-       has1=true;
-       break;
+        has1=true;
+        break;
       }
     }
 
     if(has1){
       //find backedge with endpoint vBB[1]
       for(vector<Edge>::iterator VI=be.begin(), VE=be.end(); VI!=VE; ++VI){
-       assert(vBB.size()>0 && "vector too small");
-       if( VI->getSecond()->getElement() == vBB[1] ){
-         //vBB[0]=VI->getFirst()->getElement();
+        assert(vBB.size()>0 && "vector too small");
+        if( VI->getSecond()->getElement() == vBB[1] ){
+          //vBB[0]=VI->getFirst()->getElement();
           vBB.erase(vBB.begin());
-         break;
-       }
+          break;
+        }
       }
     }
 
     if(has2){
       //find backedge with startpoint vBB[vBB.size()-1]
       for(vector<Edge>::iterator VI=be.begin(), VE=be.end(); VI!=VE; ++VI){
-       assert(vBB.size()>0 && "vector too small");
-       if( VI->getFirst()->getElement() == vBB[vBB.size()-1] &&
+        assert(vBB.size()>0 && "vector too small");
+        if( VI->getFirst()->getElement() == vBB[vBB.size()-1] &&
             VI->getSecond()->getElement() == vBB[0]){
-         //vBB.push_back(VI->getSecond()->getElement());
-         break;
-       }
+          //vBB.push_back(VI->getSecond()->getElement());
+          break;
+        }
       }
     }
     else
@@ -114,7 +114,7 @@ void getPathFrmNode(Node *n, vector<BasicBlock*> &vBB, int pathNo, Graph &g,
   assert(pathNo-maxCount>=0);
 
   return getPathFrmNode(nextRoot, vBB, pathNo-maxCount, g, stDummy,
-                       exDummy, be, strand);
+                        exDummy, be, strand);
 }
 
 
index ae8a8bdb73c9c3d8b0ea44f97dddae2403f3a9c0..9018ee6c2bd5fc3e1d24f4fc940fab83e9390e14 100644 (file)
@@ -36,7 +36,7 @@ namespace {
 
 ModulePass *llvm::createTraceBasicBlockPass()
 {
-       return new TraceBasicBlocks();
+  return new TraceBasicBlocks();
 }
 
 static void InsertInstrumentationCall (BasicBlock *BB,
index 586c923077b3d55e258a90be1c6d725c5dce75ea..9838ea101ac499989728152cde2d770764753158 100644 (file)
@@ -33,7 +33,7 @@ DisablePtrHashing("tracedisablehashdisable", cl::Hidden,
 static cl::list<std::string>
 TraceFuncNames("tracefunc", cl::desc("Only trace specific functions in the "
                                      "-trace or -tracem passes"),
-              cl::value_desc("function"), cl::Hidden);
+               cl::value_desc("function"), cl::Hidden);
 
 static void TraceValuesAtBBExit(BasicBlock *BB,
                                 Function *Printf, Function* HashPtrToSeqNum,
index a2ca367c458b95beb3f141b1ac062e5ac5884ded..7307ff813a2886cf9a04bf279f8fa76d723e86c1 100644 (file)
@@ -229,7 +229,7 @@ bool ADCE::doADCE() {
                  isa<UnwindInst>(I) || isa<UnreachableInst>(I)) {
         // FIXME: Unreachable instructions should not be marked intrinsically
         // live here.
-       markInstructionLive(I);
+        markInstructionLive(I);
       } else if (isInstructionTriviallyDead(I)) {
         // Remove the instruction from it's basic block...
         BB->getInstList().erase(I);
index 7c5cfa823a4b7e030a517544bdb519d4b37edd40..766cf0173261a5195cca25048d129b000fb89181 100644 (file)
@@ -2896,7 +2896,7 @@ Instruction *InstCombiner::visitSetCondInst(BinaryOperator &I) {
                                                       I.getName()), I);
           }
         }
-        
+
         if (Op1)
           return new SelectInst(LHSI->getOperand(0), Op1, Op2);
         break;
@@ -4640,9 +4640,9 @@ static Constant *GetGEPGlobalInitializer(Constant *C, ConstantExpr *CE) {
       if (ConstantStruct *CS = dyn_cast<ConstantStruct>(C)) {
         C = CS->getOperand(El);
       } else if (isa<ConstantAggregateZero>(C)) {
-       C = Constant::getNullValue(STy->getElementType(El));
+        C = Constant::getNullValue(STy->getElementType(El));
       } else if (isa<UndefValue>(C)) {
-       C = UndefValue::get(STy->getElementType(El));
+        C = UndefValue::get(STy->getElementType(El));
       } else {
         return 0;
       }
index 45b81f7e39c1698fd18b7389e4706e4c31d6a38c..75df8bb72814fd882573ed2ecbdde39ac242b49e 100644 (file)
@@ -88,7 +88,7 @@ static unsigned ApproximateLoopSize(const Loop *L) {
       } else if (I->hasOneUse() && I->use_back() == Term) {
         // Ignore instructions only used by the loop terminator.
       } else if (DbgInfoIntrinsic *DbgI = dyn_cast<DbgInfoIntrinsic>(I)) {
-       // Ignore debug instructions
+        // Ignore debug instructions
       } else {
         ++Size;
       }
index 384c00d1ceb7a26897aa17995076ebf966f8aa60..d9d74ca8ea93b627c49d0895ae978e576b13f5ae 100644 (file)
@@ -835,13 +835,13 @@ void SCCPSolver::visitLoadInst(LoadInst &I) {
     // Transform load (constantexpr_GEP global, 0, ...) into the value loaded.
     if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr))
       if (CE->getOpcode() == Instruction::GetElementPtr)
-       if (GlobalVariable *GV = dyn_cast<GlobalVariable>(CE->getOperand(0)))
-         if (GV->isConstant() && !GV->isExternal())
-           if (Constant *V =
-               GetGEPGlobalInitializer(GV->getInitializer(), CE)) {
-             markConstant(IV, &I, V);
-             return;
-           }
+    if (GlobalVariable *GV = dyn_cast<GlobalVariable>(CE->getOperand(0)))
+      if (GV->isConstant() && !GV->isExternal())
+        if (Constant *V =
+        GetGEPGlobalInitializer(GV->getInitializer(), CE)) {
+          markConstant(IV, &I, V);
+          return;
+        }
   }
 
   // Otherwise we cannot say for certain what value this load will produce.
@@ -915,7 +915,7 @@ void SCCPSolver::visitCallSite(CallSite CS) {
 void SCCPSolver::Solve() {
   // Process the work lists until they are empty!
   while (!BBWorkList.empty() || !InstWorkList.empty() ||
-        !OverdefinedInstWorkList.empty()) {
+         !OverdefinedInstWorkList.empty()) {
     // Process the instruction work list...
     while (!OverdefinedInstWorkList.empty()) {
       Value *I = OverdefinedInstWorkList.back();
index 5eca653fa4fb9513cec0d36525061852359fb787..5bfd9893d708c85a1a03df65b5a8f364576727a4 100644 (file)
@@ -33,7 +33,7 @@ llvm::CloneTrace(const std::vector<BasicBlock*> &origTrace) {
   //this loop. To fix the phi nodes, we delete incoming branches
   //that are not in the trace.
   for(std::vector<BasicBlock *>::const_iterator T = origTrace.begin(),
-       End = origTrace.end(); T != End; ++T) {
+    End = origTrace.end(); T != End; ++T) {
 
     //Clone Basic Block
     BasicBlock *clonedBlock =
@@ -67,19 +67,19 @@ llvm::CloneTrace(const std::vector<BasicBlock*> &origTrace) {
 
   //Second loop to do the remapping
   for(std::vector<BasicBlock *>::const_iterator BB = clonedTrace.begin(),
-       BE = clonedTrace.end(); BB != BE; ++BB) {
+    BE = clonedTrace.end(); BB != BE; ++BB) {
     for(BasicBlock::iterator I = (*BB)->begin(); I != (*BB)->end(); ++I) {
 
       //Loop over all the operands of the instruction
       for(unsigned op=0, E = I->getNumOperands(); op != E; ++op) {
-       const Value *Op = I->getOperand(op);
-       
-       //Get it out of the value map
-       Value *V = ValueMap[Op];
-
-       //If not in the value map, then its outside our trace so ignore
-       if(V != 0)
-         I->setOperand(op,V);
+    const Value *Op = I->getOperand(op);
+
+    //Get it out of the value map
+    Value *V = ValueMap[Op];
+
+    //If not in the value map, then its outside our trace so ignore
+    if(V != 0)
+      I->setOperand(op,V);
       }
     }
   }
index a9fb9247c1f5d0547ee31f2422e1120017ae7bcb..98d12d8f1381368a497887dec4fe6037a4942545 100644 (file)
@@ -138,7 +138,7 @@ void BasicBlock::removePredecessor(BasicBlock *Pred,
                                    bool DontDeleteUselessPHIs) {
   assert((hasNUsesOrMore(16)||// Reduce cost of this assertion for complex CFGs.
           find(pred_begin(this), pred_end(this), Pred) != pred_end(this)) &&
-        "removePredecessor: BB is not a predecessor!");
+         "removePredecessor: BB is not a predecessor!");
 
   if (InstList.empty()) return;
   PHINode *APN = dyn_cast<PHINode>(&front());
@@ -209,7 +209,7 @@ void BasicBlock::removePredecessor(BasicBlock *Pred,
 BasicBlock *BasicBlock::splitBasicBlock(iterator I, const std::string &BBName) {
   assert(getTerminator() && "Can't use splitBasicBlock on degenerate BB!");
   assert(I != InstList.end() &&
-        "Trying to get me to create degenerate basic block!");
+         "Trying to get me to create degenerate basic block!");
 
   BasicBlock *New = new BasicBlock(BBName, getParent(), getNext());
 
index 220c7d9997b6494069d0fa21cb6bf10cd3468e72..a59bd4eb065ac61ac2b7a8e49974f8a26cda4d43 100644 (file)
@@ -258,7 +258,7 @@ bool DominatorSet::runOnFunction(Function &F) {
   Roots.clear();
   Roots.push_back(Root);
   assert(pred_begin(Root) == pred_end(Root) &&
-        "Root node has predecessors in function!");
+         "Root node has predecessors in function!");
 
   ImmediateDominators &ID = getAnalysis<ImmediateDominators>();
   Doms.clear();
@@ -448,7 +448,7 @@ DominanceFrontier::calculate(const DominatorTree &DT,
     DomSetType::const_iterator CDFI = ChildDF.begin(), CDFE = ChildDF.end();
     for (; CDFI != CDFE; ++CDFI) {
       if (!Node->dominates(DT[*CDFI]))
-       S.insert(*CDFI);
+        S.insert(*CDFI);
     }
   }