- s/DOUT/DEBUG(errs()/g
authorBill Wendling <isanbard@gmail.com>
Mon, 3 Aug 2009 00:11:34 +0000 (00:11 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 3 Aug 2009 00:11:34 +0000 (00:11 +0000)
- Tidy up some headers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77929 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86CodeEmitter.cpp
lib/Target/X86/X86FloatingPoint.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86JITInfo.cpp
lib/Target/X86/X86Subtarget.cpp

index 683b137d4b7196e1c7717d2832f9cce5b934fca9..26504ba7d48ecac29ccde2885450e8565c51e2d5 100644 (file)
@@ -466,7 +466,7 @@ template<class CodeEmitter>
 void Emitter<CodeEmitter>::emitInstruction(
                               const MachineInstr &MI,
                               const TargetInstrDesc *Desc) {
-  DOUT << MI;
+  DEBUG(errs() << MI);
 
   MCE.processDebugLoc(MI.getDebugLoc());
 
@@ -597,11 +597,11 @@ void Emitter<CodeEmitter>::emitInstruction(
     if (CurOp != NumOps) {
       const MachineOperand &MO = MI.getOperand(CurOp++);
 
-      DOUT << "RawFrm CurOp " << CurOp << "\n";
-      DOUT << "isMBB " << MO.isMBB() << "\n";
-      DOUT << "isGlobal " << MO.isGlobal() << "\n";
-      DOUT << "isSymbol " << MO.isSymbol() << "\n";
-      DOUT << "isImm " << MO.isImm() << "\n";
+      DEBUG(errs() << "RawFrm CurOp " << CurOp << "\n");
+      DEBUG(errs() << "isMBB " << MO.isMBB() << "\n");
+      DEBUG(errs() << "isGlobal " << MO.isGlobal() << "\n");
+      DEBUG(errs() << "isSymbol " << MO.isSymbol() << "\n");
+      DEBUG(errs() << "isImm " << MO.isImm() << "\n");
 
       if (MO.isMBB()) {
         emitPCRelativeBlockAddress(MO.getMBB());
index 5fa7b82299de8edf7790b30f297e6fab0fd7e88b..91a0a2a626f3ac5d44c97b10c0ebd8e088e7f7a0 100644 (file)
 #define DEBUG_TYPE "x86-codegen"
 #include "X86.h"
 #include "X86InstrInfo.h"
+#include "llvm/ADT/DepthFirstIterator.h"
+#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/Statistic.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
 #include "llvm/CodeGen/Passes.h"
-#include "llvm/Target/TargetInstrInfo.h"
-#include "llvm/Target/TargetMachine.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/ADT/DepthFirstIterator.h"
-#include "llvm/ADT/SmallPtrSet.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/Statistic.h"
-#include "llvm/ADT/STLExtras.h"
+#include "llvm/Support/raw_ostream.h"
+#include "llvm/Target/TargetInstrInfo.h"
+#include "llvm/Target/TargetMachine.h"
 #include <algorithm>
 using namespace llvm;
 
@@ -238,7 +239,7 @@ bool FPS::processBasicBlock(MachineFunction &MF, MachineBasicBlock &BB) {
       PrevMI = prior(I);
 
     ++NumFP;  // Keep track of # of pseudo instrs
-    DOUT << "\nFPInst:\t" << *MI;
+    DEBUG(errs() << "\nFPInst:\t" << *MI);
 
     // Get dead variables list now because the MI pointer may be deleted as part
     // of processing!
@@ -265,7 +266,7 @@ bool FPS::processBasicBlock(MachineFunction &MF, MachineBasicBlock &BB) {
     for (unsigned i = 0, e = DeadRegs.size(); i != e; ++i) {
       unsigned Reg = DeadRegs[i];
       if (Reg >= X86::FP0 && Reg <= X86::FP6) {
-        DOUT << "Register FP#" << Reg-X86::FP0 << " is dead!\n";
+        DEBUG(errs() << "Register FP#" << Reg-X86::FP0 << " is dead!\n");
         freeStackSlotAfter(I, Reg-X86::FP0);
       }
     }
index c1e10233e43559b4bd08d9b522abf3eacb2a1e63..6fb051ded8b853adb2dc37639636c947cf55e17c 100644 (file)
@@ -647,12 +647,12 @@ void X86DAGToDAGISel::InstructionSelect() {
 
   // Codegen the basic block.
 #ifndef NDEBUG
-  DOUT << "===== Instruction selection begins:\n";
+  DEBUG(errs() << "===== Instruction selection begins:\n");
   Indent = 0;
 #endif
   SelectRoot(*CurDAG);
 #ifndef NDEBUG
-  DOUT << "===== Instruction selection ends:\n";
+  DEBUG(errs() << "===== Instruction selection ends:\n");
 #endif
 
   CurDAG->RemoveDeadNodes();
@@ -805,7 +805,7 @@ bool X86DAGToDAGISel::MatchAddressRecursively(SDValue N, X86ISelAddressMode &AM,
                                               unsigned Depth) {
   bool is64Bit = Subtarget->is64Bit();
   DebugLoc dl = N.getDebugLoc();
-  DOUT << "MatchAddress: "; DEBUG(AM.dump());
+  DEBUG(errs() << "MatchAddress: "); DEBUG(AM.dump());
   // Limit recursion.
   if (Depth > 5)
     return MatchAddressBase(N, AM);
@@ -1581,17 +1581,17 @@ SDNode *X86DAGToDAGISel::Select(SDValue N) {
   DebugLoc dl = Node->getDebugLoc();
   
 #ifndef NDEBUG
-  DOUT << std::string(Indent, ' ') << "Selecting: ";
+  DEBUG(errs() << std::string(Indent, ' ') << "Selecting: ");
   DEBUG(Node->dump(CurDAG));
-  DOUT << "\n";
+  DEBUG(errs() << "\n");
   Indent += 2;
 #endif
 
   if (Node->isMachineOpcode()) {
 #ifndef NDEBUG
-    DOUT << std::string(Indent-2, ' ') << "== ";
+    DEBUG(errs() << std::string(Indent-2, ' ') << "== ");
     DEBUG(Node->dump(CurDAG));
-    DOUT << "\n";
+    DEBUG(errs() << "\n");
     Indent -= 2;
 #endif
     return NULL;   // Already selected.
@@ -1689,9 +1689,9 @@ SDNode *X86DAGToDAGISel::Select(SDValue N) {
       InFlag = Result.getValue(2);
       ReplaceUses(N.getValue(0), Result);
 #ifndef NDEBUG
-      DOUT << std::string(Indent-2, ' ') << "=> ";
+      DEBUG(errs() << std::string(Indent-2, ' ') << "=> ");
       DEBUG(Result.getNode()->dump(CurDAG));
-      DOUT << "\n";
+      DEBUG(errs() << "\n");
 #endif
     }
     // Copy the high half of the result, if it is needed.
@@ -1717,9 +1717,9 @@ SDNode *X86DAGToDAGISel::Select(SDValue N) {
       }
       ReplaceUses(N.getValue(1), Result);
 #ifndef NDEBUG
-      DOUT << std::string(Indent-2, ' ') << "=> ";
+      DEBUG(errs() << std::string(Indent-2, ' ') << "=> ");
       DEBUG(Result.getNode()->dump(CurDAG));
-      DOUT << "\n";
+      DEBUG(errs() << "\n");
 #endif
     }
 
@@ -1859,9 +1859,9 @@ SDNode *X86DAGToDAGISel::Select(SDValue N) {
       InFlag = Result.getValue(2);
       ReplaceUses(N.getValue(0), Result);
 #ifndef NDEBUG
-      DOUT << std::string(Indent-2, ' ') << "=> ";
+      DEBUG(errs() << std::string(Indent-2, ' ') << "=> ");
       DEBUG(Result.getNode()->dump(CurDAG));
-      DOUT << "\n";
+      DEBUG(errs() << "\n");
 #endif
     }
     // Copy the remainder (high) result, if it is needed.
@@ -1888,9 +1888,9 @@ SDNode *X86DAGToDAGISel::Select(SDValue N) {
       }
       ReplaceUses(N.getValue(1), Result);
 #ifndef NDEBUG
-      DOUT << std::string(Indent-2, ' ') << "=> ";
+      DEBUG(errs() << std::string(Indent-2, ' ') << "=> ");
       DEBUG(Result.getNode()->dump(CurDAG));
-      DOUT << "\n";
+      DEBUG(errs() << "\n");
 #endif
     }
 
@@ -1946,12 +1946,12 @@ SDNode *X86DAGToDAGISel::Select(SDValue N) {
   SDNode *ResNode = SelectCode(N);
 
 #ifndef NDEBUG
-  DOUT << std::string(Indent-2, ' ') << "=> ";
+  DEBUG(errs() << std::string(Indent-2, ' ') << "=> ");
   if (ResNode == NULL || ResNode == N.getNode())
     DEBUG(N.getNode()->dump(CurDAG));
   else
     DEBUG(ResNode->dump(CurDAG));
-  DOUT << "\n";
+  DEBUG(errs() << "\n");
   Indent -= 2;
 #endif
 
index 24e391ec17cc172a820340b6b72b933831420cd1..dc8dd4d723845158c7b01d14ec7cf9eeff36cf4d 100644 (file)
@@ -348,10 +348,10 @@ X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr) {
 #endif
 
 #if 0
-  DOUT << "In callback! Addr=" << (void*)RetAddr
-       << " ESP=" << (void*)StackPtr
-       << ": Resolving call to function: "
-       << TheVM->getFunctionReferencedName((void*)RetAddr) << "\n";
+  DEBUG(errs() << "In callback! Addr=" << (void*)RetAddr
+               << " ESP=" << (void*)StackPtr
+               << ": Resolving call to function: "
+               << TheVM->getFunctionReferencedName((void*)RetAddr) << "\n");
 #endif
 
   // Sanity check to make sure this really is a call instruction.
index 6e5d8d808d8a90b2343dc1bb15a113d7677b3c56..f3a8d75c8a07aabdb6793139e7169a3acc5713f1 100644 (file)
 #include "llvm/GlobalValue.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetOptions.h"
 using namespace llvm;
 
 #if defined(_MSC_VER)
-    #include <intrin.h>
+#include <intrin.h>
 #endif
 
 static cl::opt<X86Subtarget::AsmWriterFlavorTy>
@@ -427,9 +428,9 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &FS,
   if (Is64Bit)
     HasX86_64 = true;
 
-  DOUT << "Subtarget features: SSELevel " << X86SSELevel
-       << ", 3DNowLevel " << X863DNowLevel
-       << ", 64bit " << HasX86_64 << "\n";
+  DEBUG(errs() << "Subtarget features: SSELevel " << X86SSELevel
+               << ", 3DNowLevel " << X863DNowLevel
+               << ", 64bit " << HasX86_64 << "\n");
   assert((!Is64Bit || HasX86_64) &&
          "64-bit code requested on a subtarget that doesn't support it!");