aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-01 22:15:03 +0000
committerChris Lattner <sabre@nondot.org>2003-08-01 22:15:03 +0000
commit6806f5614d2ec260fda954c951d33f58e77ed610 (patch)
treed103b65b37e9ad4a641d8be8801db06da23d0aee /lib
parentc648dabf65c67d20c208ed0b39b9622387e636c7 (diff)
downloadexternal_llvm-6806f5614d2ec260fda954c951d33f58e77ed610.zip
external_llvm-6806f5614d2ec260fda954c951d33f58e77ed610.tar.gz
external_llvm-6806f5614d2ec260fda954c951d33f58e77ed610.tar.bz2
DEBUG got moved to Support/Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/DataStructure/BottomUpClosure.cpp1
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp1
-rw-r--r--lib/Analysis/DataStructure/Local.cpp4
-rw-r--r--lib/Analysis/DataStructure/Steensgaard.cpp2
-rw-r--r--lib/Analysis/DataStructure/TopDownClosure.cpp1
-rw-r--r--lib/Analysis/InductionVariable.cpp2
-rw-r--r--lib/Transforms/ExprTypeConvert.cpp2
-rw-r--r--lib/Transforms/IPO/DeadArgumentElimination.cpp1
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp3
-rw-r--r--lib/Transforms/IPO/Internalize.cpp3
-rw-r--r--lib/Transforms/IPO/MutateStructTypes.cpp2
-rw-r--r--lib/Transforms/IPO/PoolAllocate.cpp2
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp2
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp2
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/GraphAuxillary.cpp2
-rw-r--r--lib/Transforms/LevelRaise.cpp24
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp3
-rw-r--r--lib/Transforms/Scalar/CorrelatedExprs.cpp1
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp3
-rw-r--r--lib/Transforms/Scalar/LICM.cpp3
-rw-r--r--lib/Transforms/Scalar/PRE.cpp1
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp1
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp3
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp3
-rw-r--r--lib/Transforms/Scalar/TailDuplication.cpp1
25 files changed, 45 insertions, 28 deletions
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp
index aff74ac..dd141f2 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 a3fecec..c25256a 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 641c2e0..a03354d 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 8226657..a3034dd 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 1eeb690..92a03ee 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 cdcc42f..3ac934e 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 c107976..0703968 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 568fe47..c4e73af 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 4839186..cde2e4a 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 0ed76ab..7bca459 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 9df724c..370b6be 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 9f958ad..095b03f 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 50497fd..4f46e5b 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 e910616..b942351 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 e910616..b942351 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 9f93c27..a5bdce7 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 6b838ba..27623fb 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 26bdfda..3e8dc0c 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 993e533..4203818 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 9069338..2ac0a44 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 3a1239f..a976545 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 82ae37a..c4f5fb1 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 df55037..c0ff2fa 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 fceaccc..e59a6e5 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 eea2096..d13affc 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 {