[llvm-commits] [llvm] r76211 - in /llvm/trunk/lib/Target: ARM/ARMCodeEmitter.cpp Alpha/AlphaCodeEmitter.cpp PowerPC/PPCCodeEmitter.cpp

Jeffrey Yasskin jyasskin at google.com
Fri Jul 17 11:49:51 PDT 2009


Author: jyasskin
Date: Fri Jul 17 13:49:39 2009
New Revision: 76211

URL: http://llvm.org/viewvc/llvm-project?rev=76211&view=rev
Log:
r76102 added the MachineCodeEmitter::processDebugLoc call and called it from
the X86 Emitter.  This patch extends that to the rest of the targets that can
write to a MachineCodeEmitter: ARM, Alpha, and PPC.


Modified:
    llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
    llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp
    llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp?rev=76211&r1=76210&r2=76211&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Fri Jul 17 13:49:39 2009
@@ -337,6 +337,8 @@
 void Emitter<CodeEmitter>::emitInstruction(const MachineInstr &MI) {
   DOUT << "JIT: " << (void*)MCE.getCurrentPCValue() << ":\t" << MI;
 
+  MCE.processDebugLoc(MI.getDebugLoc());
+
   NumEmitted++;  // Keep track of the # of mi's emitted
   switch (MI.getDesc().TSFlags & ARMII::FormMask) {
   default: {
@@ -1422,4 +1424,3 @@
 }
 
 #include "ARMGenCodeEmitter.inc"
-

Modified: llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp?rev=76211&r1=76210&r2=76211&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp Fri Jul 17 13:49:39 2009
@@ -72,8 +72,6 @@
       return "Alpha Machine Code Emitter";
     }
 
-    void emitInstruction(const MachineInstr &MI);
-
   private:
     void emitBasicBlock(MachineBasicBlock &MBB);
   };
@@ -118,6 +116,7 @@
   for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end();
        I != E; ++I) {
     const MachineInstr &MI = *I;
+    MCE.processDebugLoc(MI.getDebugLoc());
     switch(MI.getOpcode()) {
     default:
       MCE.emitWordLE(getBinaryCodeForInstr(*I));
@@ -245,5 +244,3 @@
 }
 
 #include "AlphaGenCodeEmitter.inc"
-
-

Modified: llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp?rev=76211&r1=76210&r2=76211&view=diff

==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp Fri Jul 17 13:49:39 2009
@@ -133,6 +133,7 @@
   
   for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I){
     const MachineInstr &MI = *I;
+    MCE.processDebugLoc(MI.getDebugLoc());
     switch (MI.getOpcode()) {
     default:
       MCE.emitWordBE(getBinaryCodeForInstr(MI));
@@ -275,4 +276,3 @@
 }
 
 #include "PPCGenCodeEmitter.inc"
-





More information about the llvm-commits mailing list