diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2009-07-17 18:49:39 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2009-07-17 18:49:39 +0000 |
commit | 75402822d6acc1fe62d911771cd7cf8358c718d7 (patch) | |
tree | 6d0b40994681e4a301da88e5ad046b6c77bd360d | |
parent | d75ec23ab738a81aca7b0877d8089082092fb317 (diff) | |
download | external_llvm-75402822d6acc1fe62d911771cd7cf8358c718d7.zip external_llvm-75402822d6acc1fe62d911771cd7cf8358c718d7.tar.gz external_llvm-75402822d6acc1fe62d911771cd7cf8358c718d7.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76211 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMCodeEmitter.cpp | 3 | ||||
-rw-r--r-- | lib/Target/Alpha/AlphaCodeEmitter.cpp | 5 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCCodeEmitter.cpp | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/lib/Target/ARM/ARMCodeEmitter.cpp b/lib/Target/ARM/ARMCodeEmitter.cpp index 3442fcd..cda3b21 100644 --- a/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/lib/Target/ARM/ARMCodeEmitter.cpp @@ -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" - diff --git a/lib/Target/Alpha/AlphaCodeEmitter.cpp b/lib/Target/Alpha/AlphaCodeEmitter.cpp index 98eeb89..aacacf7 100644 --- a/lib/Target/Alpha/AlphaCodeEmitter.cpp +++ b/lib/Target/Alpha/AlphaCodeEmitter.cpp @@ -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" - - diff --git a/lib/Target/PowerPC/PPCCodeEmitter.cpp b/lib/Target/PowerPC/PPCCodeEmitter.cpp index 4090a22..b741957 100644 --- a/lib/Target/PowerPC/PPCCodeEmitter.cpp +++ b/lib/Target/PowerPC/PPCCodeEmitter.cpp @@ -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" - |