Add debugging stuff.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 14 Mar 2008 07:13:42 +0000 (07:13 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 14 Mar 2008 07:13:42 +0000 (07:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48359 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86CodeEmitter.cpp

index 19b52e8dafc2f418a1c3faa771e4a236840fbb4e..33b87be50d23f489a27a58a64b96e950368e047b 100644 (file)
@@ -28,6 +28,7 @@
 #include "llvm/Function.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Target/TargetOptions.h"
 using namespace llvm;
 
@@ -118,6 +119,7 @@ bool Emitter::runOnMachineFunction(MachineFunction &MF) {
   Is64BitMode = TM.getSubtarget<X86Subtarget>().is64Bit();
   
   do {
+    DOUT << "JITTing function '" << MF.getFunction()->getName() << "'\n";
     MCE.startFunction(MF);
     for (MachineFunction::iterator MBB = MF.begin(), E = MF.end(); 
          MBB != E; ++MBB) {
@@ -538,6 +540,8 @@ unsigned Emitter::determineREX(const MachineInstr &MI) {
 
 void Emitter::emitInstruction(const MachineInstr &MI,
                               const TargetInstrDesc *Desc) {
+  DOUT << MI;
+
   unsigned Opcode = Desc->Opcode;
 
   // Emit the lock opcode prefix as needed.