diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-01 22:15:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-01 22:15:03 +0000 |
commit | 6806f5614d2ec260fda954c951d33f58e77ed610 (patch) | |
tree | d103b65b37e9ad4a641d8be8801db06da23d0aee | |
parent | c648dabf65c67d20c208ed0b39b9622387e636c7 (diff) |
DEBUG got moved to Support/Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7492 91177308-0d34-0410-b5e6-96231b3b80d8
25 files changed, 45 insertions, 28 deletions
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp index aff74ac920..dd141f2daf 100644 --- a/lib/Analysis/DataStructure/BottomUpClosure.cpp +++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp @@ -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 { diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index a3fecec69c..c25256a4fe 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -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" diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index 641c2e0a1e..a03354d466 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -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. diff --git a/lib/Analysis/DataStructure/Steensgaard.cpp b/lib/Analysis/DataStructure/Steensgaard.cpp index 8226657847..a3034ddeac 100644 --- a/lib/Analysis/DataStructure/Steensgaard.cpp +++ b/lib/Analysis/DataStructure/Steensgaard.cpp @@ -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 { diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp index 1eeb690789..92a03ee2f4 100644 --- a/lib/Analysis/DataStructure/TopDownClosure.cpp +++ b/lib/Analysis/DataStructure/TopDownClosure.cpp @@ -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" diff --git a/lib/Analysis/InductionVariable.cpp b/lib/Analysis/InductionVariable.cpp index cdcc42f871..3ac934e42b 100644 --- a/lib/Analysis/InductionVariable.cpp +++ b/lib/Analysis/InductionVariable.cpp @@ -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)) diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp index c10797615e..070396847e 100644 --- a/lib/Transforms/ExprTypeConvert.cpp +++ b/lib/Transforms/ExprTypeConvert.cpp @@ -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; diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 568fe47d0f..c4e73af7e8 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -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> diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index 4839186966..cde2e4a729 100644 --- a/lib/Transforms/IPO/InlineSimple.cpp +++ b/lib/Transforms/IPO/InlineSimple.cpp @@ -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 { diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index 0ed76aba62..7bca45970a 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -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> diff --git a/lib/Transforms/IPO/MutateStructTypes.cpp b/lib/Transforms/IPO/MutateStructTypes.cpp index 9df724ca78..370b6be894 100644 --- a/lib/Transforms/IPO/MutateStructTypes.cpp +++ b/lib/Transforms/IPO/MutateStructTypes.cpp @@ -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 diff --git a/lib/Transforms/IPO/PoolAllocate.cpp b/lib/Transforms/IPO/PoolAllocate.cpp index 9f958add20..095b03fad2 100644 --- a/lib/Transforms/IPO/PoolAllocate.cpp +++ b/lib/Transforms/IPO/PoolAllocate.cpp @@ -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; diff --git a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp index 50497fdf10..4f46e5b45c 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp @@ -7,7 +7,7 @@ #include "Graph.h" #include "llvm/iTerminators.h" -#include "Support/Statistic.h" +#include "Support/Debug.h" #include <algorithm> using std::map; diff --git a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp index e910616d29..b942351958 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp @@ -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" diff --git a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp index e910616d29..b942351958 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp @@ -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" diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index 9f93c27f53..a5bdce758d 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/lib/Transforms/LevelRaise.cpp @@ -16,11 +16,11 @@ #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 diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 6b838ba186..27623fbacb 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -15,9 +15,10 @@ #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 { diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index 26bdfda631..3e8dc0ce5d 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp @@ -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> diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 993e533abc..4203818baa 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -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"); diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 9069338e32..2ac0a4466c 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -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> diff --git a/lib/Transforms/Scalar/PRE.cpp b/lib/Transforms/Scalar/PRE.cpp index 3a1239f4e6..a97654556c 100644 --- a/lib/Transforms/Scalar/PRE.cpp +++ b/lib/Transforms/Scalar/PRE.cpp @@ -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" diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index 82ae37a53c..c4f5fb1848 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -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" diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index df55037c52..c0ff2fae74 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -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> diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index fceaccc89a..e59a6e58ef 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -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"); diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index eea2096a9e..d13affceb2 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/lib/Transforms/Scalar/TailDuplication.cpp @@ -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 { |