DEBUG got moved to Support/Debug.h
authorChris Lattner <sabre@nondot.org>
Fri, 1 Aug 2003 22:15:03 +0000 (22:15 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 1 Aug 2003 22:15:03 +0000 (22:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7492 91177308-0d34-0410-b5e6-96231b3b80d8

25 files changed:
lib/Analysis/DataStructure/BottomUpClosure.cpp
lib/Analysis/DataStructure/DataStructure.cpp
lib/Analysis/DataStructure/Local.cpp
lib/Analysis/DataStructure/Steensgaard.cpp
lib/Analysis/DataStructure/TopDownClosure.cpp
lib/Analysis/InductionVariable.cpp
lib/Transforms/ExprTypeConvert.cpp
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/IPO/InlineSimple.cpp
lib/Transforms/IPO/Internalize.cpp
lib/Transforms/IPO/MutateStructTypes.cpp
lib/Transforms/IPO/PoolAllocate.cpp
lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp
lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp
lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp
lib/Transforms/LevelRaise.cpp
lib/Transforms/Scalar/ADCE.cpp
lib/Transforms/Scalar/CorrelatedExprs.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Scalar/PRE.cpp
lib/Transforms/Scalar/Reassociate.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Scalar/ScalarReplAggregates.cpp
lib/Transforms/Scalar/TailDuplication.cpp

index aff74ac92064070a64b75b9b205b2964ecb13749..dd141f2daf697d1af5bcd9a29fb6c16a9bd80428 100644 (file)
@@ -10,6 +10,7 @@
 #include "llvm/Analysis/DataStructure.h"
 #include "llvm/Module.h"
 #include "Support/Statistic.h"
+#include "Support/Debug.h"
 #include "DSCallSiteIterator.h"
 
 namespace {
index a3fecec69ccb7edd69217ce8ef2f81d067e7f406..c25256a4fed7c4c0b68a2ddd57904534f2fca658 100644 (file)
@@ -10,6 +10,7 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Assembly/Writer.h"
+#include "Support/Debug.h"
 #include "Support/STLExtras.h"
 #include "Support/Statistic.h"
 #include "Support/Timer.h"
index 641c2e0a1eb1705c0af68387cad5165aaf6482e9..a03354d466e3f954ae5a3d67a94acf465f45884b 100644 (file)
@@ -17,9 +17,9 @@
 #include "llvm/GlobalVariable.h"
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/Target/TargetData.h"
-#include "Support/Statistic.h"
-#include "Support/Timer.h"
 #include "Support/CommandLine.h"
+#include "Support/Debug.h"
+#include "Support/Timer.h"
 
 // FIXME: This should eventually be a FunctionPass that is automatically
 // aggregated into a Pass.
index 8226657847099819db904b8b297ad1d650a516e3..a3034ddeac2da6d65054825a31e2f492318365de 100644 (file)
@@ -11,7 +11,7 @@
 #include "llvm/Analysis/DSGraph.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Module.h"
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
 
 namespace {
   class Steens : public Pass, public AliasAnalysis {
index 1eeb6907894e7bb6182f2e70b272e7502e7a0bcd..92a03ee2f40e31a437406a4328b09a7e8d4f3a7f 100644 (file)
@@ -10,6 +10,7 @@
 #include "llvm/Analysis/DataStructure.h"
 #include "llvm/Module.h"
 #include "llvm/DerivedTypes.h"
+#include "Support/Debug.h"
 #include "Support/Statistic.h"
 #include "DSCallSiteIterator.h"
 
index cdcc42f871243a9177e7ba13bcb917d9d3287455..3ac934e42b1baf91a6b036585f5545e63ae71b1b 100644 (file)
@@ -27,7 +27,7 @@
 #include "llvm/Constants.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/Assembly/Writer.h"
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
 
 static bool isLoopInvariant(const Value *V, const Loop *L) {
   if (isa<Constant>(V) || isa<Argument>(V) || isa<GlobalValue>(V))
index c10797615eede100146d739647bad47431dbef1d..070396847e7023368c6e26a894399e9796d8295f 100644 (file)
@@ -13,7 +13,7 @@
 #include "llvm/ConstantHandling.h"
 #include "llvm/Analysis/Expressions.h"
 #include "Support/STLExtras.h"
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
 #include <algorithm>
 using std::cerr;
 
index 568fe47d0fb5c8272f3c1d5a0ad7a49a6854e78b..c4e73af7e8334922afb78b3ca5b0721f06e3650a 100644 (file)
@@ -17,6 +17,7 @@
 #include "llvm/iOther.h"
 #include "llvm/iTerminators.h"
 #include "llvm/Support/CallSite.h"
+#include "Support/Debug.h"
 #include "Support/Statistic.h"
 #include "Support/iterator"
 #include <set>
index 4839186966ee8f2924b1e7fd41e800a99600a6eb..cde2e4a729a7875c6069e00b5afd4e3519f2a745 100644 (file)
@@ -10,8 +10,9 @@
 #include "llvm/Pass.h"
 #include "llvm/iOther.h"
 #include "llvm/iMemory.h"
-#include "Support/Statistic.h"
 #include "Support/CommandLine.h"
+#include "Support/Debug.h"
+#include "Support/Statistic.h"
 #include <set>
 
 namespace {
index 0ed76aba6280d2fc20620e8f11761c99e8f159d3..7bca45970a96e3133aab6fe5767c1fff59c4bfbc 100644 (file)
@@ -9,8 +9,9 @@
 #include "llvm/Transforms/IPO.h"
 #include "llvm/Pass.h"
 #include "llvm/Module.h"
-#include "Support/Statistic.h"
 #include "Support/CommandLine.h"
+#include "Support/Debug.h"
+#include "Support/Statistic.h"
 #include <fstream>
 #include <set>
 
index 9df724ca78ea8e3b023ad73d664a34791bcbd3a9..370b6be8940cae0c928b9acea93b4245c07dd08d 100644 (file)
@@ -18,7 +18,7 @@
 #include "llvm/Instructions.h"
 #include "llvm/Constants.h"
 #include "Support/STLExtras.h"
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
 #include <algorithm>
 
 // ValuePlaceHolder - A stupid little marker value.  It appears as an
index 9f958add20d1327f582073aa8eb2361b0d10df18..095b03fad27fcef499d11d8a419d74250b913dd6 100644 (file)
@@ -15,7 +15,7 @@
 #include "llvm/Instructions.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Support/InstVisitor.h"
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
 #include "Support/VectorExtras.h"
 using namespace PA;
 
index 50497fdf10e34f2b3fdb20449e0e8641b5741a95..4f46e5b45c072cf5bb80e1e693c3bfc62bfd0708 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "Graph.h"
 #include "llvm/iTerminators.h"
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
 #include <algorithm>
 
 using std::map;
index e910616d2905dccdab18253847bfaa0698ac35d3..b9423519585c3c0cbf645f64b6a3557f08f0c3e4 100644 (file)
@@ -10,7 +10,7 @@
 #include "llvm/Pass.h"
 #include "llvm/Module.h"
 #include "llvm/iTerminators.h"
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
 #include <algorithm>
 #include "Graph.h"
 
index e910616d2905dccdab18253847bfaa0698ac35d3..b9423519585c3c0cbf645f64b6a3557f08f0c3e4 100644 (file)
@@ -10,7 +10,7 @@
 #include "llvm/Pass.h"
 #include "llvm/Module.h"
 #include "llvm/iTerminators.h"
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
 #include <algorithm>
 #include "Graph.h"
 
index 9f93c27f5382c8d7e3c718bc39b29a57e180b0d0..a5bdce758d3b39fecc920679ff651f18adf58945 100644 (file)
 #include "llvm/Analysis/Expressions.h"
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
-#include "Support/STLExtras.h"
-#include "Support/Statistic.h"
 #include "Support/CommandLine.h"
+#include "Support/Debug.h"
+#include "Support/Statistic.h"
+#include "Support/STLExtras.h"
 #include <algorithm>
-using std::cerr;
 
 // StartInst - This enables the -raise-start-inst=foo option to cause the level
 // raising pass to start at instruction "foo", which is immensely useful for
@@ -274,7 +274,7 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
       if (ExpressionConvertibleToType(Src, DestTy, ConvertedTypes, TD)) {
         PRINT_PEEPHOLE3("CAST-SRC-EXPR-CONV:in ", Src, CI, BB->getParent());
           
-        DEBUG(cerr << "\nCONVERTING SRC EXPR TYPE:\n");
+        DEBUG(std::cerr << "\nCONVERTING SRC EXPR TYPE:\n");
         { // ValueMap must be destroyed before function verified!
           ValueMapCache ValueMap;
           Value *E = ConvertExpressionToType(Src, DestTy, ValueMap, TD);
@@ -283,7 +283,8 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
             CI->replaceAllUsesWith(CPV);
           
           PRINT_PEEPHOLE1("CAST-SRC-EXPR-CONV:out", E);
-          DEBUG(cerr << "DONE CONVERTING SRC EXPR TYPE: \n" << BB->getParent());
+          DEBUG(std::cerr << "DONE CONVERTING SRC EXPR TYPE: \n"
+                          << BB->getParent());
         }
 
         DEBUG(assert(verifyFunction(*BB->getParent()) == false &&
@@ -302,14 +303,14 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
       if (ValueConvertibleToType(CI, Src->getType(), ConvertedTypes, TD)) {
         PRINT_PEEPHOLE3("CAST-DEST-EXPR-CONV:in ", Src, CI, BB->getParent());
 
-        DEBUG(cerr << "\nCONVERTING EXPR TYPE:\n");
+        DEBUG(std::cerr << "\nCONVERTING EXPR TYPE:\n");
         { // ValueMap must be destroyed before function verified!
           ValueMapCache ValueMap;
           ConvertValueToNewType(CI, Src, ValueMap, TD);  // This will delete CI!
         }
 
         PRINT_PEEPHOLE1("CAST-DEST-EXPR-CONV:out", Src);
-        DEBUG(cerr << "DONE CONVERTING EXPR TYPE: \n\n" << BB->getParent());
+        DEBUG(std::cerr << "DONE CONVERTING EXPR TYPE: \n\n" << BB->getParent());
 
         DEBUG(assert(verifyFunction(*BB->getParent()) == false &&
                      "Function broken!"));
@@ -556,11 +557,11 @@ bool RPR::DoRaisePass(Function &F) {
   bool Changed = false;
   for (Function::iterator BB = F.begin(), BBE = F.end(); BB != BBE; ++BB)
     for (BasicBlock::iterator BI = BB->begin(); BI != BB->end();) {
-      DEBUG(cerr << "Processing: " << *BI);
+      DEBUG(std::cerr << "Processing: " << *BI);
       if (dceInstruction(BI) || doConstantPropagation(BI)) {
         Changed = true; 
         ++NumDCEorCP;
-        DEBUG(cerr << "***\t\t^^-- Dead code eliminated!\n");
+        DEBUG(std::cerr << "***\t\t^^-- Dead code eliminated!\n");
       } else if (PeepholeOptimize(BB, BI)) {
         Changed = true;
       } else {
@@ -574,7 +575,8 @@ bool RPR::DoRaisePass(Function &F) {
 
 // runOnFunction - Raise a function representation to a higher level.
 bool RPR::runOnFunction(Function &F) {
-  DEBUG(cerr << "\n\n\nStarting to work on Function '" << F.getName() << "'\n");
+  DEBUG(std::cerr << "\n\n\nStarting to work on Function '" << F.getName()
+                  << "'\n");
 
   // Insert casts for all incoming pointer pointer values that are treated as
   // arrays...
@@ -596,7 +598,7 @@ bool RPR::runOnFunction(Function &F) {
   }
 
   do {
-    DEBUG(cerr << "Looping: \n" << F);
+    DEBUG(std::cerr << "Looping: \n" << F);
 
     // Iterate over the function, refining it, until it converges on a stable
     // state
index 6b838ba1862d212769c675a63c39ede44128ce8b..27623fbacb9a5b868f6db4a3c6c5be2fd37c1170 100644 (file)
 #include "llvm/iPHINode.h"
 #include "llvm/Constant.h"
 #include "llvm/Support/CFG.h"
-#include "Support/STLExtras.h"
+#include "Support/Debug.h"
 #include "Support/DepthFirstIterator.h"
 #include "Support/Statistic.h"
+#include "Support/STLExtras.h"
 #include <algorithm>
 
 namespace {
index 26bdfda63187fb9e57ed4b52bf96573c566f55f5..3e8dc0ce5dab0c6e4a7f41ca255844d9e885d551 100644 (file)
@@ -31,6 +31,7 @@
 #include "llvm/Transforms/Utils/Local.h"
 #include "llvm/Support/ConstantRange.h"
 #include "llvm/Support/CFG.h"
+#include "Support/Debug.h"
 #include "Support/PostOrderIterator.h"
 #include "Support/Statistic.h"
 #include <algorithm>
index 993e533abc726f33bef660bd106fce2e76a45a6f..4203818baaf788989a5595bd497b90dbc7ceb3b8 100644 (file)
@@ -13,8 +13,9 @@
 #include "llvm/Type.h"
 #include "llvm/Constants.h"
 #include "llvm/Support/CFG.h"
-#include "Support/STLExtras.h"
+#include "Support/Debug.h"
 #include "Support/Statistic.h"
+#include "Support/STLExtras.h"
 
 namespace {
   Statistic<> NumRemoved ("indvars", "Number of aux indvars removed");
index 9069338e32353357c5f0772a59cf4f1772943ffa..2ac0a4466c49c3b00ceb37bbc8d0b6f130afbc1f 100644 (file)
@@ -31,8 +31,9 @@
 #include "llvm/Target/TargetData.h"
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/Support/CFG.h"
-#include "Support/Statistic.h"
 #include "Support/CommandLine.h"
+#include "Support/Debug.h"
+#include "Support/Statistic.h"
 #include "llvm/Assembly/Writer.h"
 #include <algorithm>
 
index 3a1239f4e67d0465db8a56244b580eec952d8389..a97654556caecf667a65a38707c9d3fa80e65351 100644 (file)
@@ -23,6 +23,7 @@
 #include "llvm/Analysis/PostDominators.h"
 #include "llvm/Analysis/ValueNumbering.h"
 #include "llvm/Transforms/Scalar.h"
+#include "Support/Debug.h"
 #include "Support/DepthFirstIterator.h"
 #include "Support/PostOrderIterator.h"
 #include "Support/Statistic.h"
index 82ae37a53c1d0401447385eb95e45c91f7522949..c4f5fb1848cabf8275416dc54299284b1c2f74ed 100644 (file)
@@ -26,6 +26,7 @@
 #include "llvm/Pass.h"
 #include "llvm/Constant.h"
 #include "llvm/Support/CFG.h"
+#include "Support/Debug.h"
 #include "Support/PostOrderIterator.h"
 #include "Support/Statistic.h"
 
index df55037c520b30632b2f0b80e74a52724db0bf81..c0ff2fae74c628275fea49b00d49cac4ed853113 100644 (file)
@@ -20,8 +20,9 @@
 #include "llvm/Instructions.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/InstVisitor.h"
-#include "Support/STLExtras.h"
+#include "Support/Debug.h"
 #include "Support/Statistic.h"
+#include "Support/STLExtras.h"
 #include <algorithm>
 #include <set>
 
index fceaccc89a507c21527894380359e109eb9e1a68..e59a6e58ef09b8cf43891adc49ce2c10cbe1fd9c 100644 (file)
@@ -13,8 +13,9 @@
 #include "llvm/iMemory.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Constants.h"
-#include "Support/StringExtras.h"
+#include "Support/Debug.h"
 #include "Support/Statistic.h"
+#include "Support/StringExtras.h"
 
 namespace {
   Statistic<> NumReplaced("scalarrepl", "Number of alloca's broken up");
index eea2096a9ef885f74977e352e022cdb4b9ceb23b..d13affceb273fe3b6b10dba97ef6dac787a35687 100644 (file)
@@ -19,6 +19,7 @@
 #include "llvm/Type.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/Transforms/Utils/Local.h"
+#include "Support/Debug.h"
 #include "Support/Statistic.h"
 
 namespace {