diff options
45 files changed, 302 insertions, 256 deletions
diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp index 07820e3506..d4ae73cee8 100644 --- a/lib/Analysis/AliasAnalysisEvaluator.cpp +++ b/lib/Analysis/AliasAnalysisEvaluator.cpp @@ -29,7 +29,7 @@ #include "llvm/Support/InstIterator.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" -#include "llvm/Support/Streams.h" +#include "llvm/Support/raw_ostream.h" #include <set> #include <sstream> using namespace llvm; @@ -89,10 +89,10 @@ static void PrintResults(const char *Msg, bool P, const Value *V1, const Value * WriteAsOperand(s2, V2, true, M); std::string o1(s1.str()), o2(s2.str()); if (o2 < o1) - std::swap(o1, o2); - cerr << " " << Msg << ":\t" - << o1 << ", " - << o2 << "\n"; + std::swap(o1, o2); + errs() << " " << Msg << ":\t" + << o1 << ", " + << o2 << "\n"; } } @@ -100,9 +100,9 @@ static inline void PrintModRefResults(const char *Msg, bool P, Instruction *I, Value *Ptr, Module *M) { if (P) { - cerr << " " << Msg << ": Ptr: "; - WriteAsOperand(*cerr.stream(), Ptr, true, M); - cerr << "\t<->" << *I; + errs() << " " << Msg << ": Ptr: "; + WriteAsOperand(errs(), Ptr, true, M); + errs() << "\t<->" << *I; } } @@ -136,8 +136,8 @@ bool AAEval::runOnFunction(Function &F) { if (PrintNoAlias || PrintMayAlias || PrintMustAlias || PrintNoModRef || PrintMod || PrintRef || PrintModRef) - cerr << "Function: " << F.getName() << ": " << Pointers.size() - << " pointers, " << CallSites.size() << " call sites\n"; + errs() << "Function: " << F.getName() << ": " << Pointers.size() + << " pointers, " << CallSites.size() << " call sites\n"; // iterate over the worklist, and run the full (n^2)/2 disambiguations for (std::set<Value *>::iterator I1 = Pointers.begin(), E = Pointers.end(); @@ -162,7 +162,7 @@ bool AAEval::runOnFunction(Function &F) { PrintResults("MustAlias", PrintMustAlias, *I1, *I2, F.getParent()); ++MustAlias; break; default: - cerr << "Unknown alias query result!\n"; + errs() << "Unknown alias query result!\n"; } } } @@ -192,7 +192,7 @@ bool AAEval::runOnFunction(Function &F) { PrintModRefResults(" ModRef", PrintModRef, I, *V, F.getParent()); ++ModRef; break; default: - cerr << "Unknown alias query result!\n"; + errs() << "Unknown alias query result!\n"; } } } @@ -201,45 +201,45 @@ bool AAEval::runOnFunction(Function &F) { } static void PrintPercent(unsigned Num, unsigned Sum) { - cerr << "(" << Num*100ULL/Sum << "." - << ((Num*1000ULL/Sum) % 10) << "%)\n"; + errs() << "(" << Num*100ULL/Sum << "." + << ((Num*1000ULL/Sum) % 10) << "%)\n"; } bool AAEval::doFinalization(Module &M) { unsigned AliasSum = NoAlias + MayAlias + MustAlias; - cerr << "===== Alias Analysis Evaluator Report =====\n"; + errs() << "===== Alias Analysis Evaluator Report =====\n"; if (AliasSum == 0) { - cerr << " Alias Analysis Evaluator Summary: No pointers!\n"; + errs() << " Alias Analysis Evaluator Summary: No pointers!\n"; } else { - cerr << " " << AliasSum << " Total Alias Queries Performed\n"; - cerr << " " << NoAlias << " no alias responses "; + errs() << " " << AliasSum << " Total Alias Queries Performed\n"; + errs() << " " << NoAlias << " no alias responses "; PrintPercent(NoAlias, AliasSum); - cerr << " " << MayAlias << " may alias responses "; + errs() << " " << MayAlias << " may alias responses "; PrintPercent(MayAlias, AliasSum); - cerr << " " << MustAlias << " must alias responses "; + errs() << " " << MustAlias << " must alias responses "; PrintPercent(MustAlias, AliasSum); - cerr << " Alias Analysis Evaluator Pointer Alias Summary: " - << NoAlias*100/AliasSum << "%/" << MayAlias*100/AliasSum << "%/" - << MustAlias*100/AliasSum << "%\n"; + errs() << " Alias Analysis Evaluator Pointer Alias Summary: " + << NoAlias*100/AliasSum << "%/" << MayAlias*100/AliasSum << "%/" + << MustAlias*100/AliasSum << "%\n"; } // Display the summary for mod/ref analysis unsigned ModRefSum = NoModRef + Mod + Ref + ModRef; if (ModRefSum == 0) { - cerr << " Alias Analysis Mod/Ref Evaluator Summary: no mod/ref!\n"; + errs() << " Alias Analysis Mod/Ref Evaluator Summary: no mod/ref!\n"; } else { - cerr << " " << ModRefSum << " Total ModRef Queries Performed\n"; - cerr << " " << NoModRef << " no mod/ref responses "; + errs() << " " << ModRefSum << " Total ModRef Queries Performed\n"; + errs() << " " << NoModRef << " no mod/ref responses "; PrintPercent(NoModRef, ModRefSum); - cerr << " " << Mod << " mod responses "; + errs() << " " << Mod << " mod responses "; PrintPercent(Mod, ModRefSum); - cerr << " " << Ref << " ref responses "; + errs() << " " << Ref << " ref responses "; PrintPercent(Ref, ModRefSum); - cerr << " " << ModRef << " mod & ref responses "; + errs() << " " << ModRef << " mod & ref responses "; PrintPercent(ModRef, ModRefSum); - cerr << " Alias Analysis Evaluator Mod/Ref Summary: " - << NoModRef*100/ModRefSum << "%/" << Mod*100/ModRefSum << "%/" - << Ref*100/ModRefSum << "%/" << ModRef*100/ModRefSum << "%\n"; + errs() << " Alias Analysis Evaluator Mod/Ref Summary: " + << NoModRef*100/ModRefSum << "%/" << Mod*100/ModRefSum << "%/" + << Ref*100/ModRefSum << "%/" << ModRef*100/ModRefSum << "%\n"; } return false; diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 6dabcdb94b..4d15a48d4e 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -75,7 +75,7 @@ public: virtual void print(std::ostream &o, const Module *M) const { o << "CallGraph Root is: "; if (Function *F = getRoot()->getFunction()) - o << F->getName() << "\n"; + o << F->getNameStr() << "\n"; else o << "<<null function: 0x" << getRoot() << ">>\n"; @@ -244,13 +244,13 @@ CallGraphNode *CallGraph::getOrInsertFunction(const Function *F) { void CallGraphNode::print(std::ostream &OS) const { if (Function *F = getFunction()) - OS << "Call graph node for function: '" << F->getName() <<"'\n"; + OS << "Call graph node for function: '" << F->getNameStr() <<"'\n"; else OS << "Call graph node <<null function: 0x" << this << ">>:\n"; for (const_iterator I = begin(), E = end(); I != E; ++I) if (Function *FI = I->second->getFunction()) - OS << " Calls function '" << FI->getName() <<"'\n"; + OS << " Calls function '" << FI->getNameStr() <<"'\n"; else OS << " Calls external node\n"; OS << "\n"; diff --git a/lib/Analysis/IVUsers.cpp b/lib/Analysis/IVUsers.cpp index 0f0bbbad35..ebfc53fc78 100644 --- a/lib/Analysis/IVUsers.cpp +++ b/lib/Analysis/IVUsers.cpp @@ -129,8 +129,8 @@ static bool getSCEVStartAndStride(const SCEV *&SH, Loop *L, Loop *UseLoop, if (!AddRecStride->dominates(Preheader, DT)) return false; - DOUT << "[" << L->getHeader()->getName() - << "] Variable stride: " << *AddRec << "\n"; + DEBUG(errs() << "[" << L->getHeader()->getName() + << "] Variable stride: " << *AddRec << "\n"); } Stride = AddRecStride; diff --git a/lib/Analysis/Trace.cpp b/lib/Analysis/Trace.cpp index 8f19fda953..31c7a19ff6 100644 --- a/lib/Analysis/Trace.cpp +++ b/lib/Analysis/Trace.cpp @@ -33,7 +33,7 @@ Module *Trace::getModule() const { /// void Trace::print(std::ostream &O) const { Function *F = getFunction (); - O << "; Trace from function " << F->getName() << ", blocks:\n"; + O << "; Trace from function " << F->getNameStr() << ", blocks:\n"; for (const_iterator i = begin(), e = end(); i != e; ++i) { O << "; "; WriteAsOperand(O, *i, true, getModule()); diff --git a/lib/CodeGen/ELFCodeEmitter.cpp b/lib/CodeGen/ELFCodeEmitter.cpp index fb439c68fd..1c27428cc3 100644 --- a/lib/CodeGen/ELFCodeEmitter.cpp +++ b/lib/CodeGen/ELFCodeEmitter.cpp @@ -25,6 +25,7 @@ #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/raw_ostream.h" //===----------------------------------------------------------------------===// // ELFCodeEmitter Implementation @@ -35,7 +36,8 @@ namespace llvm { /// startFunction - This callback is invoked when a new machine function is /// about to be emitted. void ELFCodeEmitter::startFunction(MachineFunction &MF) { - DOUT << "processing function: " << MF.getFunction()->getName() << "\n"; + DEBUG(errs() << "processing function: " + << MF.getFunction()->getName() << "\n"); // Get the ELF Section that this function belongs in. ES = &EW.getTextSection(); diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp index 608d18d591..9dbd6d1241 100644 --- a/lib/CodeGen/IfConversion.cpp +++ b/lib/CodeGen/IfConversion.cpp @@ -228,8 +228,8 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) { TII = MF.getTarget().getInstrInfo(); if (!TII) return false; - DOUT << "\nIfcvt: function (" << ++FnNum << ") \'" - << MF.getFunction()->getName() << "\'"; + DEBUG(errs() << "\nIfcvt: function (" << ++FnNum << ") \'" + << MF.getFunction()->getName() << "\'"); if (FnNum < IfCvtFnStart || (IfCvtFnStop != -1 && FnNum > IfCvtFnStop)) { DOUT << " skipped\n"; diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 79a4762560..57bcfb52c8 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -503,7 +503,7 @@ void LiveIntervals::print(std::ostream &O, const Module* ) const { O << "********** MACHINEINSTRS **********\n"; for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end(); mbbi != mbbe; ++mbbi) { - O << ((Value*)mbbi->getBasicBlock())->getName() << ":\n"; + O << ((Value*)mbbi->getBasicBlock())->getNameStr() << ":\n"; for (MachineBasicBlock::iterator mii = mbbi->begin(), mie = mbbi->end(); mii != mie; ++mii) { O << getInstructionIndex(mii) << '\t' << *mii; @@ -985,9 +985,9 @@ void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB, /// which a variable is live void LiveIntervals::computeIntervals() { - DOUT << "********** COMPUTING LIVE INTERVALS **********\n" - << "********** Function: " - << ((Value*)mf_->getFunction())->getName() << '\n'; + DEBUG(errs() << "********** COMPUTING LIVE INTERVALS **********\n" + << "********** Function: " + << ((Value*)mf_->getFunction())->getName() << '\n'); SmallVector<unsigned, 8> UndefUses; for (MachineFunction::iterator MBBI = mf_->begin(), E = mf_->end(); @@ -995,7 +995,7 @@ void LiveIntervals::computeIntervals() { MachineBasicBlock *MBB = MBBI; // Track the index of the current machine instr. unsigned MIIndex = getMBBStartIdx(MBB); - DOUT << ((Value*)MBB->getBasicBlock())->getName() << ":\n"; + DEBUG(errs() << ((Value*)MBB->getBasicBlock())->getName() << ":\n"); MachineBasicBlock::iterator MI = MBB->begin(), miEnd = MBB->end(); diff --git a/lib/CodeGen/LowerSubregs.cpp b/lib/CodeGen/LowerSubregs.cpp index 5008f1472d..d7d50baec9 100644 --- a/lib/CodeGen/LowerSubregs.cpp +++ b/lib/CodeGen/LowerSubregs.cpp @@ -25,6 +25,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Compiler.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; namespace { @@ -271,7 +272,8 @@ bool LowerSubregsInstructionPass::runOnMachineFunction(MachineFunction &MF) { bool MadeChange = false; DOUT << "********** LOWERING SUBREG INSTRS **********\n"; - DOUT << "********** Function: " << MF.getFunction()->getName() << '\n'; + DEBUG(errs() << "********** Function: " + << MF.getFunction()->getName() << '\n'); for (MachineFunction::iterator mbbi = MF.begin(), mbbe = MF.end(); mbbi != mbbe; ++mbbi) { diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 34f840a828..98396ee6d0 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -253,7 +253,7 @@ void MachineFunction::dump() const { } void MachineFunction::print(std::ostream &OS) const { - OS << "# Machine code for " << Fn->getName () << "():\n"; + OS << "# Machine code for " << Fn->getNameStr () << "():\n"; // Print Frame Information FrameInfo->print(*this, OS); @@ -297,7 +297,7 @@ void MachineFunction::print(std::ostream &OS) const { for (const_iterator BB = begin(); BB != end(); ++BB) BB->print(OS); - OS << "\n# End machine code for " << Fn->getName () << "().\n\n"; + OS << "\n# End machine code for " << Fn->getNameStr () << "().\n\n"; } namespace llvm { diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index aaa4de4b2c..b69311f926 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/lib/CodeGen/MachineLICM.cpp @@ -33,6 +33,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -355,14 +356,14 @@ void MachineLICM::Hoist(MachineInstr &MI) { // Now move the instructions to the predecessor, inserting it before any // terminator instructions. DEBUG({ - DOUT << "Hoisting " << MI; + errs() << "Hoisting " << MI; if (CurPreheader->getBasicBlock()) - DOUT << " to MachineBasicBlock " - << CurPreheader->getBasicBlock()->getName(); + errs() << " to MachineBasicBlock " + << CurPreheader->getBasicBlock()->getName(); if (MI.getParent()->getBasicBlock()) - DOUT << " from MachineBasicBlock " - << MI.getParent()->getBasicBlock()->getName(); - DOUT << "\n"; + errs() << " from MachineBasicBlock " + << MI.getParent()->getBasicBlock()->getName(); + errs() << "\n"; }); // Look for opportunity to CSE the hoisted instruction. diff --git a/lib/CodeGen/MachineVerifier.cpp b/lib/CodeGen/MachineVerifier.cpp index 77bfcb5e9e..e4a26bcdc1 100644 --- a/lib/CodeGen/MachineVerifier.cpp +++ b/lib/CodeGen/MachineVerifier.cpp @@ -237,7 +237,7 @@ MachineVerifier::report(const char *msg, const MachineFunction *MF) if (!foundErrors++) MF->print(OS); *OS << "*** Bad machine code: " << msg << " ***\n" - << "- function: " << MF->getFunction()->getName() << "\n"; + << "- function: " << MF->getFunction()->getNameStr() << "\n"; } void @@ -245,7 +245,7 @@ MachineVerifier::report(const char *msg, const MachineBasicBlock *MBB) { assert(MBB); report(msg, MBB->getParent()); - *OS << "- basic block: " << MBB->getBasicBlock()->getName() + *OS << "- basic block: " << MBB->getBasicBlock()->getNameStr() << " " << (void*)MBB << " (#" << MBB->getNumber() << ")\n"; } diff --git a/lib/CodeGen/RegAllocBigBlock.cpp b/lib/CodeGen/RegAllocBigBlock.cpp index 91e4099d0c..8cae9da4ba 100644 --- a/lib/CodeGen/RegAllocBigBlock.cpp +++ b/lib/CodeGen/RegAllocBigBlock.cpp @@ -615,7 +615,7 @@ void RABigBlock::AllocateBasicBlock(MachineBasicBlock &MBB) { const TargetInstrInfo &TII = *TM->getInstrInfo(); DEBUG(const BasicBlock *LBB = MBB.getBasicBlock(); - if (LBB) DOUT << "\nStarting RegAlloc of BB: " << LBB->getName()); + if (LBB) errs() << "\nStarting RegAlloc of BB: " << LBB->getName()); // If this is the first basic block in the machine function, add live-in // registers as active. diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 63a99e461d..30c602da3b 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -37,6 +37,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/raw_ostream.h" #include <algorithm> #include <set> #include <queue> @@ -484,7 +485,8 @@ void RALinScan::linearScan() { // linear scan algorithm DOUT << "********** LINEAR SCAN **********\n"; - DOUT << "********** Function: " << mf_->getFunction()->getName() << '\n'; + DEBUG(errs() << "********** Function: " + << mf_->getFunction()->getName() << '\n'); DEBUG(printIntervals("fixed", fixed_.begin(), fixed_.end())); diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp index 1b09f77613..b3d320a914 100644 --- a/lib/CodeGen/RegAllocLocal.cpp +++ b/lib/CodeGen/RegAllocLocal.cpp @@ -714,7 +714,7 @@ void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) { MachineBasicBlock::iterator MII = MBB.begin(); DEBUG(const BasicBlock *LBB = MBB.getBasicBlock(); - if (LBB) DOUT << "\nStarting RegAlloc of BB: " << LBB->getName()); + if (LBB) errs() << "\nStarting RegAlloc of BB: " << LBB->getName()); // Add live-in registers as active. for (MachineBasicBlock::livein_iterator I = MBB.livein_begin(), diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp index 89e2c59fe8..f22c29482b 100644 --- a/lib/CodeGen/RegAllocPBQP.cpp +++ b/lib/CodeGen/RegAllocPBQP.cpp @@ -42,6 +42,7 @@ #include "llvm/CodeGen/RegAllocRegistry.h" #include "llvm/CodeGen/RegisterCoalescer.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include <limits> @@ -804,7 +805,8 @@ bool PBQPRegAlloc::runOnMachineFunction(MachineFunction &MF) { vrm = &getAnalysis<VirtRegMap>(); - DOUT << "PBQP Register Allocating for " << mf->getFunction()->getName() << "\n"; + DEBUG(errs() << "PBQP Register Allocating for " + << mf->getFunction()->getName() << "\n"); // Allocator main loop: // diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index b0a19df052..ab87449945 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -50,6 +50,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/Timer.h" +#include "llvm/Support/raw_ostream.h" #include <algorithm> using namespace llvm; @@ -318,7 +319,7 @@ bool SelectionDAGISel::runOnFunction(Function &Fn) { else GFI = 0; RegInfo = &MF->getRegInfo(); - DOUT << "\n\n\n=== " << Fn.getName() << "\n"; + DEBUG(errs() << "\n\n\n=== " << Fn.getName() << "\n"); MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>(); DwarfWriter *DW = getAnalysisIfAvailable<DwarfWriter>(); diff --git a/lib/CodeGen/ShrinkWrapping.cpp b/lib/CodeGen/ShrinkWrapping.cpp index e44a138cf9..b1f56d5205 100644 --- a/lib/CodeGen/ShrinkWrapping.cpp +++ b/lib/CodeGen/ShrinkWrapping.cpp @@ -158,7 +158,7 @@ void PEI::initShrinkWrappingInfo() { // via --shrink-wrap-func=<funcname>. #ifndef NDEBUG if (ShrinkWrapFunc != "") { - std::string MFName = MF->getFunction()->getName(); + std::string MFName = MF->getFunction()->getNameStr(); ShrinkWrapThisFunction = (MFName == ShrinkWrapFunc); } #endif @@ -185,8 +185,8 @@ void PEI::placeCSRSpillsAndRestores(MachineFunction &Fn) { initShrinkWrappingInfo(); DEBUG(if (ShrinkWrapThisFunction) { - DOUT << "Place CSR spills/restores for " - << MF->getFunction()->getName() << "\n"; + errs() << "Place CSR spills/restores for " + << MF->getFunction()->getName() << "\n"; }); if (calculateSets(Fn)) @@ -357,8 +357,8 @@ bool PEI::calculateSets(MachineFunction &Fn) { // If no CSRs used, we are done. if (CSI.empty()) { DEBUG(if (ShrinkWrapThisFunction) - DOUT << "DISABLED: " << Fn.getFunction()->getName() - << ": uses no callee-saved registers\n"); + errs() << "DISABLED: " << Fn.getFunction()->getName() + << ": uses no callee-saved registers\n"); return false; } @@ -377,8 +377,8 @@ bool PEI::calculateSets(MachineFunction &Fn) { // implementation to functions with <= 500 MBBs. if (Fn.size() > 500) { DEBUG(if (ShrinkWrapThisFunction) - DOUT << "DISABLED: " << Fn.getFunction()->getName() - << ": too large (" << Fn.size() << " MBBs)\n"); + errs() << "DISABLED: " << Fn.getFunction()->getName() + << ": too large (" << Fn.size() << " MBBs)\n"); ShrinkWrapThisFunction = false; } @@ -459,7 +459,7 @@ bool PEI::calculateSets(MachineFunction &Fn) { } if (allCSRUsesInEntryBlock) { - DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() + DEBUG(errs() << "DISABLED: " << Fn.getFunction()->getName() << ": all CSRs used in EntryBlock\n"); ShrinkWrapThisFunction = false; } else { @@ -471,7 +471,7 @@ bool PEI::calculateSets(MachineFunction &Fn) { allCSRsUsedInEntryFanout = false; } if (allCSRsUsedInEntryFanout) { - DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() + DEBUG(errs() << "DISABLED: " << Fn.getFunction()->getName() << ": all CSRs used in imm successors of EntryBlock\n"); ShrinkWrapThisFunction = false; } @@ -498,7 +498,7 @@ bool PEI::calculateSets(MachineFunction &Fn) { if (dominatesExitNodes) { CSRUsedInChokePoints |= CSRUsed[MBB]; if (CSRUsedInChokePoints == UsedCSRegs) { - DEBUG(DOUT << "DISABLED: " << Fn.getFunction()->getName() + DEBUG(errs() << "DISABLED: " << Fn.getFunction()->getName() << ": all CSRs used in choke point(s) at " << getBasicBlockName(MBB) << "\n"); ShrinkWrapThisFunction = false; @@ -514,16 +514,16 @@ bool PEI::calculateSets(MachineFunction &Fn) { return false; DEBUG({ - DOUT << "ENABLED: " << Fn.getFunction()->getName(); + errs() << "ENABLED: " << Fn.getFunction()->getName(); if (HasFastExitPath) - DOUT << " (fast exit path)"; - DOUT << "\n"; + errs() << " (fast exit path)"; + errs() << "\n"; if (ShrinkWrapDebugging >= BasicInfo) { - DOUT << "------------------------ |