[llvm-commits] [llvm] r92625 - /llvm/trunk/lib/Transforms/IPO/Inliner.cpp

David Greene greened at obbligato.org
Mon Jan 4 17:27:51 PST 2010


Author: greened
Date: Mon Jan  4 19:27:51 2010
New Revision: 92625

URL: http://llvm.org/viewvc/llvm-project?rev=92625&view=rev
Log:
Change errs() to dbgs().

Modified:
    llvm/trunk/lib/Transforms/IPO/Inliner.cpp

Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=92625&r1=92624&r2=92625&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Mon Jan  4 19:27:51 2010
@@ -147,7 +147,7 @@
       
       // Otherwise, we *can* reuse it, RAUW AI into AvailableAlloca and declare
       // success!
-      DEBUG(errs() << "    ***MERGED ALLOCA: " << *AI);
+      DEBUG(dbgs() << "    ***MERGED ALLOCA: " << *AI);
       
       AI->replaceAllUsesWith(AvailableAlloca);
       AI->eraseFromParent();
@@ -178,13 +178,13 @@
   InlineCost IC = getInlineCost(CS);
   
   if (IC.isAlways()) {
-    DEBUG(errs() << "    Inlining: cost=always"
+    DEBUG(dbgs() << "    Inlining: cost=always"
           << ", Call: " << *CS.getInstruction() << "\n");
     return true;
   }
   
   if (IC.isNever()) {
-    DEBUG(errs() << "    NOT Inlining: cost=never"
+    DEBUG(dbgs() << "    NOT Inlining: cost=never"
           << ", Call: " << *CS.getInstruction() << "\n");
     return false;
   }
@@ -200,7 +200,7 @@
   
   float FudgeFactor = getInlineFudgeFactor(CS);
   if (Cost >= (int)(CurrentThreshold * FudgeFactor)) {
-    DEBUG(errs() << "    NOT Inlining: cost=" << Cost
+    DEBUG(dbgs() << "    NOT Inlining: cost=" << Cost
           << ", Call: " << *CS.getInstruction() << "\n");
     return false;
   }
@@ -263,14 +263,14 @@
 
     if (outerCallsFound && someOuterCallWouldNotBeInlined && 
         TotalSecondaryCost < Cost) {
-      DEBUG(errs() << "    NOT Inlining: " << *CS.getInstruction() << 
+      DEBUG(dbgs() << "    NOT Inlining: " << *CS.getInstruction() << 
            " Cost = " << Cost << 
            ", outer Cost = " << TotalSecondaryCost << '\n');
       return false;
     }
   }
 
-  DEBUG(errs() << "    Inlining: cost=" << Cost
+  DEBUG(dbgs() << "    Inlining: cost=" << Cost
         << ", Call: " << *CS.getInstruction() << '\n');
   return true;
 }
@@ -280,11 +280,11 @@
   const TargetData *TD = getAnalysisIfAvailable<TargetData>();
 
   SmallPtrSet<Function*, 8> SCCFunctions;
-  DEBUG(errs() << "Inliner visiting SCC:");
+  DEBUG(dbgs() << "Inliner visiting SCC:");
   for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
     Function *F = SCC[i]->getFunction();
     if (F) SCCFunctions.insert(F);
-    DEBUG(errs() << " " << (F ? F->getName() : "INDIRECTNODE"));
+    DEBUG(dbgs() << " " << (F ? F->getName() : "INDIRECTNODE"));
   }
 
   // Scan through and identify all call sites ahead of time so that we only
@@ -314,7 +314,7 @@
       }
   }
 
-  DEBUG(errs() << ": " << CallSites.size() << " call sites.\n");
+  DEBUG(dbgs() << ": " << CallSites.size() << " call sites.\n");
 
   // Now that we have all of the call sites, move the ones to functions in the
   // current SCC to the end of the list.
@@ -346,7 +346,7 @@
       // size.  This happens because IPSCCP propagates the result out of the
       // call and then we're left with the dead call.
       if (isInstructionTriviallyDead(CS.getInstruction())) {
-        DEBUG(errs() << "    -> Deleting dead call: "
+        DEBUG(dbgs() << "    -> Deleting dead call: "
                      << *CS.getInstruction() << "\n");
         // Update the call graph by deleting the edge from Callee to Caller.
         CG[Caller]->removeCallEdgeFor(CS);
@@ -377,7 +377,7 @@
           // callgraph references to the node, we cannot delete it yet, this
           // could invalidate the CGSCC iterator.
           CG[Callee]->getNumReferences() == 0) {
-        DEBUG(errs() << "    -> Deleting dead function: "
+        DEBUG(dbgs() << "    -> Deleting dead function: "
               << Callee->getName() << "\n");
         CallGraphNode *CalleeNode = CG[Callee];
         





More information about the llvm-commits mailing list