[llvm-commits] [llvm] r92063 - /llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp

David Greene greened at obbligato.org
Wed Dec 23 13:58:29 PST 2009


Author: greened
Date: Wed Dec 23 15:58:29 2009
New Revision: 92063

URL: http://llvm.org/viewvc/llvm-project?rev=92063&view=rev
Log:

Convert debug messages to use dbgs().  Generally this means
s/errs/dbgs/g except for certain special cases.

Modified:
    llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp

Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=92063&r1=92062&r2=92063&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original)
+++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Wed Dec 23 15:58:29 2009
@@ -131,7 +131,7 @@
       // in double.
       EdgeInformation[getFunction(e)][e] += (double)weight;
 
-      DEBUG(errs() << "--Read Edge Counter for " << e
+      DEBUG(dbgs() << "--Read Edge Counter for " << e
                    << " (# "<< (ReadCount-1) << "): "
                    << (unsigned)getEdgeWeight(e) << "\n");
     } else {
@@ -151,7 +151,7 @@
     ReadCount = 0;
     for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) {
       if (F->isDeclaration()) continue;
-      DEBUG(errs()<<"Working on "<<F->getNameStr()<<"\n");
+      DEBUG(dbgs()<<"Working on "<<F->getNameStr()<<"\n");
       readEdge(getEdge(0,&F->getEntryBlock()), Counters);
       for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
         TerminatorInst *TI = BB->getTerminator();
@@ -161,7 +161,7 @@
       }
     }
     if (ReadCount != Counters.size()) {
-      errs() << "WARNING: profile information is inconsistent with "
+      dbgs() << "WARNING: profile information is inconsistent with "
              << "the current program!\n";
     }
     NumEdgesRead = ReadCount;
@@ -172,7 +172,7 @@
     ReadCount = 0;
     for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) {
       if (F->isDeclaration()) continue;
-      DEBUG(errs()<<"Working on "<<F->getNameStr()<<"\n");
+      DEBUG(dbgs()<<"Working on "<<F->getNameStr()<<"\n");
       readEdge(getEdge(0,&F->getEntryBlock()), Counters);
       for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
         TerminatorInst *TI = BB->getTerminator();
@@ -198,10 +198,10 @@
         }
 
         if (SpanningTree.size() == size) {
-          DEBUG(errs()<<"{");
+          DEBUG(dbgs()<<"{");
           for (std::set<Edge>::iterator ei = SpanningTree.begin(),
                ee = SpanningTree.end(); ei != ee; ++ei) {
-            DEBUG(errs()<< *ei <<",");
+            DEBUG(dbgs()<< *ei <<",");
           }
           assert(0 && "No edge calculated!");
         }
@@ -209,7 +209,7 @@
       }
     }
     if (ReadCount != Counters.size()) {
-      errs() << "WARNING: profile information is inconsistent with "
+      dbgs() << "WARNING: profile information is inconsistent with "
              << "the current program!\n";
     }
     NumEdgesRead = ReadCount;
@@ -230,7 +230,7 @@
           BlockInformation[F][BB] = (double)Counters[ReadCount++];
     }
     if (ReadCount != Counters.size()) {
-      errs() << "WARNING: profile information is inconsistent with "
+      dbgs() << "WARNING: profile information is inconsistent with "
              << "the current program!\n";
     }
   }
@@ -249,7 +249,7 @@
         FunctionInformation[F] = (double)Counters[ReadCount++];
     }
     if (ReadCount != Counters.size()) {
-      errs() << "WARNING: profile information is inconsistent with "
+      dbgs() << "WARNING: profile information is inconsistent with "
              << "the current program!\n";
     }
   }





More information about the llvm-commits mailing list