[llvm-commits] [llvm] r92063 - /llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
Chris Lattner
clattner at apple.com
Wed Dec 23 14:29:07 PST 2009
On Dec 23, 2009, at 1:58 PM, David Greene wrote:
> 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.
The DEBUG calls are correct, the others are not.
-Chris
>
> 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";
> }
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list