Changes to be GCC3.1 friendly
authorChris Lattner <sabre@nondot.org>
Wed, 31 Jul 2002 19:32:12 +0000 (19:32 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 31 Jul 2002 19:32:12 +0000 (19:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3186 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/BottomUpClosure.cpp
lib/Analysis/DataStructure/DataStructure.cpp
lib/Analysis/DataStructure/TopDownClosure.cpp

index 3ea7f0c96abfdeb9ecc264f657340d1868dd6198..f35e531e41bf4892a405cdc75c44f350c9ea051d 100644 (file)
@@ -235,7 +235,7 @@ DSGraph &BUDataStructures::calculateGraph(Function &F) {
   Graph->markIncompleteNodes();
   Graph->removeDeadNodes(/*KeepAllGlobals*/ false, /*KeepCalls*/ false);
 
-  DEBUG(cerr << "  [BU] Done inlining: " << F.getName() << "\n");
+  DEBUG(std::cerr << "  [BU] Done inlining: " << F.getName() << "\n");
 
   return *Graph;
 }
index 7ef79211ac339096c3c432f30ab4f57272505670..84cb3e9da97ccff26a33e07a0af9c2b733f23ee6 100644 (file)
@@ -349,9 +349,8 @@ bool DSGraph::isNodeDead(DSNode *N) {
   return false;
 }
 
-static void
-removeIdenticalCalls(std::vector<std::vector<DSNodeHandle> >& Calls,
-                     const string& where) {
+static void removeIdenticalCalls(std::vector<std::vector<DSNodeHandle> > &Calls,
+                                 const std::string &where) {
   // Remove trivially identical function calls
   unsigned NumFns = Calls.size();
   std::sort(Calls.begin(), Calls.end());
@@ -359,8 +358,8 @@ removeIdenticalCalls(std::vector<std::vector<DSNodeHandle> >& Calls,
               Calls.end());
 
   DEBUG(if (NumFns != Calls.size())
-        std::cerr << "Merged " << (NumFns-Calls.size())
-        << " call nodes in " << where << "\n";);
+          std::cerr << "Merged " << (NumFns-Calls.size())
+                    << " call nodes in " << where << "\n";);
 }
 
 // removeTriviallyDeadNodes - After the graph has been constructed, this method
@@ -727,7 +726,7 @@ void GlobalDSGraph::cloneCalls(DSGraph& Graph) {
   }
 
   // remove trivially identical function calls
-  removeIdenticalCalls(FunctionCalls, string("Globals Graph"));
+  removeIdenticalCalls(FunctionCalls, "Globals Graph");
 }
 
 
@@ -759,3 +758,4 @@ bool LocalDataStructures::run(Module &M) {
 
   return false;
 }
+
index 8f8e2ecf51c5679c081d55bbc1234d483aca5fa6..561e857f63615afa5d7c1070c6e266e8c784798e 100644 (file)
@@ -168,7 +168,7 @@ DSGraph &TDDataStructures::calculateGraph(Function &F) {
   // Find the callers of this function recorded during the BU pass
   std::set<Function*> &PendingCallers = BUGraph.getPendingCallers();
 
-  DEBUG(cerr << "  [TD] Inlining callers for: " << F.getName() << "\n");
+  DEBUG(std::cerr << "  [TD] Inlining callers for: " << F.getName() << "\n");
 
   for (std::set<Function*>::iterator I=PendingCallers.begin(),
          E=PendingCallers.end(); I != E; ++I) {
@@ -176,7 +176,7 @@ DSGraph &TDDataStructures::calculateGraph(Function &F) {
     assert(! caller.isExternal() && "Externals unexpected in callers list");
     
     DEBUG(std::cerr << "\t [TD] Inlining " << caller.getName()
-          << " into callee: " << F.getName() << "\n");
+                    << " into callee: " << F.getName() << "\n");
     
     // These two maps keep track of where scalars in the old graph _used_
     // to point to, and of new nodes matching nodes of the old graph.
@@ -194,8 +194,8 @@ DSGraph &TDDataStructures::calculateGraph(Function &F) {
       //
       DSGraph &callerGraph = calculateGraph(caller);  // Graph to inline
       
-      DEBUG(cerr << "\t\t[TD] Got graph for " << caller.getName() << " in: "
-            << F.getName() << "\n");
+      DEBUG(std::cerr << "\t\t[TD] Got graph for " << caller.getName()
+                      << " in: " << F.getName() << "\n");
 
       // Clone the caller's graph into the current graph, keeping
       // track of where scalars in the old graph _used_ to point...
@@ -218,7 +218,8 @@ DSGraph &TDDataStructures::calculateGraph(Function &F) {
                              /*&& FIXME: NEED TO CHECK IF ALL CALLERS FOUND!*/);
   Graph->removeDeadNodes(/*KeepAllGlobals*/ false, /*KeepCalls*/ false);
 
-  DEBUG(cerr << "  [TD] Done inlining callers for: " << F.getName() << "\n");
+  DEBUG(std::cerr << "  [TD] Done inlining callers for: "
+                  << F.getName() << "\n");
 
   return *Graph;
 }