diff options
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/ExprTypeConvert.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Hello/Hello.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 36 | ||||
-rw-r--r-- | lib/Transforms/IPO/Internalize.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/BlockProfiling.cpp | 8 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/EdgeProfiling.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/TraceBasicBlocks.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 8 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LowerPacked.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/SCCP.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/Utils/CodeExtractor.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerSwitch.cpp | 3 |
13 files changed, 46 insertions, 49 deletions
diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp index 39f21ead85..1ce6eedbee 100644 --- a/lib/Transforms/ExprTypeConvert.cpp +++ b/lib/Transforms/ExprTypeConvert.cpp @@ -693,8 +693,8 @@ static void ConvertOperandToType(User *U, Value *OldVal, Value *NewVal, I->setName(""); Instruction *Res; // Result of conversion - //llvm_cerr << endl << endl << "Type:\t" << Ty << "\nInst: " << I - // << "BB Before: " << BB << endl; + //cerr << endl << endl << "Type:\t" << Ty << "\nInst: " << I + // << "BB Before: " << BB << endl; // Prevent I from being removed... ValueHandle IHandle(VMC, I); diff --git a/lib/Transforms/Hello/Hello.cpp b/lib/Transforms/Hello/Hello.cpp index 8324cbb6cb..0b0010df0f 100644 --- a/lib/Transforms/Hello/Hello.cpp +++ b/lib/Transforms/Hello/Hello.cpp @@ -30,7 +30,7 @@ namespace { HelloCounter++; std::string fname = F.getName(); EscapeString(fname); - llvm_cerr << "Hello: " << fname << "\n"; + cerr << "Hello: " << fname << "\n"; return false; } }; @@ -43,7 +43,7 @@ namespace { HelloCounter++; std::string fname = F.getName(); EscapeString(fname); - llvm_cerr << "Hello: " << fname << "\n"; + cerr << "Hello: " << fname << "\n"; return false; } diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index a0dc9373d6..764205baaa 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -494,17 +494,17 @@ static bool AllUsesOfValueWillTrapIfNull(Value *V) { // Will trap. } else if (StoreInst *SI = dyn_cast<StoreInst>(*UI)) { if (SI->getOperand(0) == V) { - //llvm_cerr << "NONTRAPPING USE: " << **UI; + //cerr << "NONTRAPPING USE: " << **UI; return false; // Storing the value. } } else if (CallInst *CI = dyn_cast<CallInst>(*UI)) { if (CI->getOperand(0) != V) { - //llvm_cerr << "NONTRAPPING USE: " << **UI; + //cerr << "NONTRAPPING USE: " << **UI; return false; // Not calling the ptr } } else if (InvokeInst *II = dyn_cast<InvokeInst>(*UI)) { if (II->getOperand(0) != V) { - //llvm_cerr << "NONTRAPPING USE: " << **UI; + //cerr << "NONTRAPPING USE: " << **UI; return false; // Not calling the ptr } } else if (CastInst *CI = dyn_cast<CastInst>(*UI)) { @@ -515,7 +515,7 @@ static bool AllUsesOfValueWillTrapIfNull(Value *V) { isa<ConstantPointerNull>(UI->getOperand(1))) { // Ignore setcc X, null } else { - //llvm_cerr << "NONTRAPPING USE: " << **UI; + //cerr << "NONTRAPPING USE: " << **UI; return false; } return true; @@ -533,7 +533,7 @@ static bool AllUsesOfLoadedValueWillTrapIfNull(GlobalVariable *GV) { // Ignore stores to the global. } else { // We don't know or understand this user, bail out. - //llvm_cerr << "UNKNOWN USER OF GLOBAL!: " << **UI; + //cerr << "UNKNOWN USER OF GLOBAL!: " << **UI; return false; } @@ -1206,25 +1206,25 @@ bool GlobalOpt::ProcessInternalGlobal(GlobalVariable *GV, if (!AnalyzeGlobal(GV, GS, PHIUsers)) { #if 0 - llvm_cerr << "Global: " << *GV; - llvm_cerr << " isLoaded = " << GS.isLoaded << "\n"; - llvm_cerr << " StoredType = "; + cerr << "Global: " << *GV; + cerr << " isLoaded = " << GS.isLoaded << "\n"; + cerr << " StoredType = "; switch (GS.StoredType) { - case GlobalStatus::NotStored: llvm_cerr << "NEVER STORED\n"; break; - case GlobalStatus::isInitializerStored: llvm_cerr << "INIT STORED\n"; break; - case GlobalStatus::isStoredOnce: llvm_cerr << "STORED ONCE\n"; break; - case GlobalStatus::isStored: llvm_cerr << "stored\n"; break; + case GlobalStatus::NotStored: cerr << "NEVER STORED\n"; break; + case GlobalStatus::isInitializerStored: cerr << "INIT STORED\n"; break; + case GlobalStatus::isStoredOnce: cerr << "STORED ONCE\n"; break; + case GlobalStatus::isStored: cerr << "stored\n"; break; } if (GS.StoredType == GlobalStatus::isStoredOnce && GS.StoredOnceValue) - llvm_cerr << " StoredOnceValue = " << *GS.StoredOnceValue << "\n"; + cerr << " StoredOnceValue = " << *GS.StoredOnceValue << "\n"; if (GS.AccessingFunction && !GS.HasMultipleAccessingFunctions) - llvm_cerr << " AccessingFunction = " << GS.AccessingFunction->getName() + cerr << " AccessingFunction = " << GS.AccessingFunction->getName() << "\n"; - llvm_cerr << " HasMultipleAccessingFunctions = " + cerr << " HasMultipleAccessingFunctions = " << GS.HasMultipleAccessingFunctions << "\n"; - llvm_cerr << " HasNonInstructionUser = " << GS.HasNonInstructionUser<<"\n"; - llvm_cerr << " isNotSuitableForSRA = " << GS.isNotSuitableForSRA << "\n"; - llvm_cerr << "\n"; + cerr << " HasNonInstructionUser = " << GS.HasNonInstructionUser<<"\n"; + cerr << " isNotSuitableForSRA = " << GS.isNotSuitableForSRA << "\n"; + cerr << "\n"; #endif // If this is a first class global and has only one accessing function diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index 3e7dcc67ae..f43a27f698 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -74,8 +74,7 @@ void InternalizePass::LoadFile(const char *Filename) { // Load the APIFile... std::ifstream In(Filename); if (!In.good()) { - llvm_cerr << "WARNING: Internalize couldn't load file '" << Filename - << "'!\n"; + cerr << "WARNING: Internalize couldn't load file '" << Filename << "'!\n"; return; // Do not internalize anything... } while (In) { diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp index af2928b0fc..af438f9655 100644 --- a/lib/Transforms/Instrumentation/BlockProfiling.cpp +++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp @@ -47,8 +47,8 @@ ModulePass *llvm::createFunctionProfilerPass() { bool FunctionProfiler::runOnModule(Module &M) { Function *Main = M.getMainFunction(); if (Main == 0) { - llvm_cerr << "WARNING: cannot insert function profiling into a module" - << " with no main function!\n"; + cerr << "WARNING: cannot insert function profiling into a module" + << " with no main function!\n"; return false; // No main, no instrumentation! } @@ -90,8 +90,8 @@ ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); } bool BlockProfiler::runOnModule(Module &M) { Function *Main = M.getMainFunction(); if (Main == 0) { - llvm_cerr << "WARNING: cannot insert block profiling into a module" - << " with no main function!\n"; + cerr << "WARNING: cannot insert block profiling into a module" + << " with no main function!\n"; return false; // No main, no instrumentation! } diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp index 40a8faaf50..36cf3e9430 100644 --- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp @@ -17,6 +17,7 @@ // //===----------------------------------------------------------------------===// +#include "ProfilingUtils.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" @@ -24,7 +25,6 @@ #include "llvm/Support/Streams.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Instrumentation.h" -#include "ProfilingUtils.h" #include <set> using namespace llvm; @@ -42,8 +42,8 @@ ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); } bool EdgeProfiler::runOnModule(Module &M) { Function *Main = M.getMainFunction(); if (Main == 0) { - llvm_cerr << "WARNING: cannot insert edge profiling into a module" - << " with no main function!\n"; + cerr << "WARNING: cannot insert edge profiling into a module" + << " with no main function!\n"; return false; // No main, no instrumentation! } diff --git a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp index 076fa81074..10b3641978 100644 --- a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp +++ b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp @@ -13,6 +13,7 @@ // //===----------------------------------------------------------------------===// +#include "ProfilingUtils.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" @@ -20,7 +21,6 @@ #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Instrumentation.h" #include "llvm/Instructions.h" -#include "ProfilingUtils.h" #include "llvm/Support/Debug.h" #include <set> using namespace llvm; @@ -61,8 +61,8 @@ static void InsertInstrumentationCall (BasicBlock *BB, bool TraceBasicBlocks::runOnModule(Module &M) { Function *Main = M.getMainFunction(); if (Main == 0) { - llvm_cerr << "WARNING: cannot insert basic-block trace instrumentation" - << " into a module with no main function!\n"; + cerr << "WARNING: cannot insert basic-block trace instrumentation" + << " into a module with no main function!\n"; return false; // No main, no instrumentation! } diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 5073bde0ba..4c0bbf4316 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -7018,8 +7018,8 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { // If we are removing arguments to the function, emit an obnoxious warning... if (FT->getNumParams() < NumActualArgs) if (!FT->isVarArg()) { - llvm_cerr << "WARNING: While resolving call to function '" - << Callee->getName() << "' arguments were dropped!\n"; + cerr << "WARNING: While resolving call to function '" + << Callee->getName() << "' arguments were dropped!\n"; } else { // Add all of the arguments in their promoted form to the arg list... for (unsigned i = FT->getNumParams(); i != NumActualArgs; ++i, ++AI) { diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index a262cf79fb..66b595fd7f 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -507,12 +507,12 @@ namespace { } void BasedUser::dump() const { - llvm_cerr << " Base=" << *Base; - llvm_cerr << " Imm=" << *Imm; + cerr << " Base=" << *Base; + cerr << " Imm=" << *Imm; if (EmittedBase) - llvm_cerr << " EB=" << *EmittedBase; + cerr << " EB=" << *EmittedBase; - llvm_cerr << " Inst: " << *Inst; + cerr << " Inst: " << *Inst; } Value *BasedUser::InsertCodeForBaseAtPosition(const SCEVHandle &NewBase, diff --git a/lib/Transforms/Scalar/LowerPacked.cpp b/lib/Transforms/Scalar/LowerPacked.cpp index f02c40f4d8..25de5fb24c 100644 --- a/lib/Transforms/Scalar/LowerPacked.cpp +++ b/lib/Transforms/Scalar/LowerPacked.cpp @@ -73,8 +73,7 @@ public: /// @param I the unhandled instruction void visitInstruction(Instruction &I) { if (isa<PackedType>(I.getType())) - llvm_cerr << "Unhandled Instruction with Packed ReturnType: " - << I << '\n'; + cerr << "Unhandled Instruction with Packed ReturnType: " << I << '\n'; } private: /// @brief Retrieves lowered values for a packed value. diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index a5f7db8f6e..5d928c145d 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -350,7 +350,7 @@ private: void visitInstruction(Instruction &I) { // If a new instruction is added to LLVM that we don't handle... - llvm_cerr << "SCCP: Don't know how to handle: " << I; + cerr << "SCCP: Don't know how to handle: " << I; markOverdefined(&I); // Just in case } }; @@ -400,7 +400,7 @@ void SCCPSolver::getFeasibleSuccessors(TerminatorInst &TI, Succs[0] = true; } } else { - llvm_cerr << "SCCP: Don't know how to handle: " << TI; + cerr << "SCCP: Don't know how to handle: " << TI; Succs.assign(TI.getNumSuccessors(), true); } } @@ -459,7 +459,7 @@ bool SCCPSolver::isEdgeFeasible(BasicBlock *From, BasicBlock *To) { } return false; } else { - llvm_cerr << "Unknown terminator instruction: " << *TI; + cerr << "Unknown terminator instruction: " << *TI; abort(); } } diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp index 52d53d53e9..a63e4e0407 100644 --- a/lib/Transforms/Utils/CodeExtractor.cpp +++ b/lib/Transforms/Utils/CodeExtractor.cpp @@ -699,10 +699,10 @@ ExtractCodeRegion(const std::vector<BasicBlock*> &code) { } } - //llvm_cerr << "NEW FUNCTION: " << *newFunction; + //cerr << "NEW FUNCTION: " << *newFunction; // verifyFunction(*newFunction); - // llvm_cerr << "OLD FUNCTION: " << *oldFunction; + // cerr << "OLD FUNCTION: " << *oldFunction; // verifyFunction(*oldFunction); DEBUG(if (verifyFunction(*newFunction)) abort()); diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index 4ad12b9c25..2adfb3ef30 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -96,8 +96,7 @@ bool LowerSwitch::runOnFunction(Function &F) { // operator<< - Used for debugging purposes. // -llvm_ostream& operator<<(llvm_ostream &O, - const std::vector<LowerSwitch::Case> &C) { +OStream& operator<<(OStream &O, const std::vector<LowerSwitch::Case> &C) { O << "["; for (std::vector<LowerSwitch::Case>::const_iterator B = C.begin(), |