- s/DOUT/DEBUG(errs()/g

- Tidy up some headers.

llvm-svn: 77929
This commit is contained in:
Bill Wendling 2009-08-03 00:11:34 +00:00
parent 55137cbc85
commit 6eecd56efc
5 changed files with 44 additions and 42 deletions

View 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());

View File

@ -31,20 +31,21 @@
#define DEBUG_TYPE "x86-codegen"
#include "X86.h"
#include "X86InstrInfo.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/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/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.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);
}
}

View 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

View 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.

View File

@ -18,12 +18,13 @@
#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!");