[llvm-commits] [PATCH] Call MCE.processDebugLoc from the remaining Targets' emitters

Chris Lattner clattner at apple.com
Fri Jul 17 09:00:28 PDT 2009


On Jul 16, 2009, at 3:21 PM, jyasskin at gmail.com wrote:

> Reviewers: ,
>
> Description:
> r76102 added the MachineCodeEmitter::processDebugLoc call and called  
> it
> from the X86 Emitter.  This patch extends that to the ARM, Alpha, and
> PPC emitters, which I think is all of the targets that can write to a
> MachineCodeEmitter.
>
> Please review this at http://codereview.appspot.com/95062

Sure, please apply.

-Chris

>
> Affected files:
>   M     lib/Target/ARM/ARMCodeEmitter.cpp
>   M     lib/Target/Alpha/AlphaCodeEmitter.cpp
>   M     lib/Target/PowerPC/PPCCodeEmitter.cpp
>
>
> Index: lib/Target/PowerPC/PPCCodeEmitter.cpp
> ===================================================================
> --- lib/Target/PowerPC/PPCCodeEmitter.cpp	(revision 76100)
> +++ lib/Target/PowerPC/PPCCodeEmitter.cpp	(working copy)
> @@ -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"
> -
> Index: lib/Target/ARM/ARMCodeEmitter.cpp
> ===================================================================
> --- lib/Target/ARM/ARMCodeEmitter.cpp	(revision 76100)
> +++ lib/Target/ARM/ARMCodeEmitter.cpp	(working copy)
> @@ -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"
> -
> Index: lib/Target/Alpha/AlphaCodeEmitter.cpp
> ===================================================================
> --- lib/Target/Alpha/AlphaCodeEmitter.cpp	(revision 76100)
> +++ lib/Target/Alpha/AlphaCodeEmitter.cpp	(working copy)
> @@ -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"
> -
> -
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list