r76102 added the MachineCodeEmitter::processDebugLoc call and called it from
authorJeffrey Yasskin <jyasskin@google.com>
Fri, 17 Jul 2009 18:49:39 +0000 (18:49 +0000)
committerJeffrey Yasskin <jyasskin@google.com>
Fri, 17 Jul 2009 18:49:39 +0000 (18:49 +0000)
the X86 Emitter.  This patch extends that to the rest of the targets that can
write to a MachineCodeEmitter: ARM, Alpha, and PPC.

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

lib/Target/ARM/ARMCodeEmitter.cpp
lib/Target/Alpha/AlphaCodeEmitter.cpp
lib/Target/PowerPC/PPCCodeEmitter.cpp

index 3442fcd4f9aa72678c2312e6e4858e31e88f5450..cda3b21b8a51aeac18e9a0f05dcc1d366bb1612f 100644 (file)
@@ -337,6 +337,8 @@ template<class CodeEmitter>
 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 @@ void Emitter<CodeEmitter>::emitMiscInstruction(const MachineInstr &MI) {
 }
 
 #include "ARMGenCodeEmitter.inc"
-
index 98eeb8983e64f4aa06135e863dc41b3ea0acdc70..aacacf70474824d02273677a56d47623841d1733 100644 (file)
@@ -72,8 +72,6 @@ namespace {
       return "Alpha Machine Code Emitter";
     }
 
-    void emitInstruction(const MachineInstr &MI);
-
   private:
     void emitBasicBlock(MachineBasicBlock &MBB);
   };
@@ -118,6 +116,7 @@ void Emitter<CodeEmitter>::emitBasicBlock(MachineBasicBlock &MBB) {
   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 @@ unsigned AlphaCodeEmitter::getMachineOpValue(const MachineInstr &MI,
 }
 
 #include "AlphaGenCodeEmitter.inc"
-
-
index 4090a22805675a842eac271f389ec74a4d87ec39..b74195778cab5f0e1a798d8104271837ca67f106 100644 (file)
@@ -133,6 +133,7 @@ void Emitter<CodeEmitter>::emitBasicBlock(MachineBasicBlock &MBB) {
   
   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 @@ unsigned PPCCodeEmitter::getMachineOpValue(const MachineInstr &MI,
 }
 
 #include "PPCGenCodeEmitter.inc"
-