[PATCH] D129262: [AVR] Remove debug location of spill/reload instructions

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 13 05:58:38 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8a12606a7ea2: [AVR] Remove debug location of spill/reload instructions (authored by Miss_Grape, committed by benshi001).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129262/new/

https://reviews.llvm.org/D129262

Files:
  llvm/lib/Target/AVR/AVRInstrInfo.cpp


Index: llvm/lib/Target/AVR/AVRInstrInfo.cpp
===================================================================
--- llvm/lib/Target/AVR/AVRInstrInfo.cpp
+++ llvm/lib/Target/AVR/AVRInstrInfo.cpp
@@ -135,11 +135,6 @@
 
   AFI->setHasSpills(true);
 
-  DebugLoc DL;
-  if (MI != MBB.end()) {
-    DL = MI->getDebugLoc();
-  }
-
   const MachineFrameInfo &MFI = MF.getFrameInfo();
 
   MachineMemOperand *MMO = MF.getMachineMemOperand(
@@ -156,7 +151,7 @@
     llvm_unreachable("Cannot store this register into a stack slot!");
   }
 
-  BuildMI(MBB, MI, DL, get(Opcode))
+  BuildMI(MBB, MI, DebugLoc(), get(Opcode))
       .addFrameIndex(FrameIndex)
       .addImm(0)
       .addReg(SrcReg, getKillRegState(isKill))
@@ -168,11 +163,6 @@
                                         Register DestReg, int FrameIndex,
                                         const TargetRegisterClass *RC,
                                         const TargetRegisterInfo *TRI) const {
-  DebugLoc DL;
-  if (MI != MBB.end()) {
-    DL = MI->getDebugLoc();
-  }
-
   MachineFunction &MF = *MBB.getParent();
   const MachineFrameInfo &MFI = MF.getFrameInfo();
 
@@ -192,7 +182,7 @@
     llvm_unreachable("Cannot load this register from a stack slot!");
   }
 
-  BuildMI(MBB, MI, DL, get(Opcode), DestReg)
+  BuildMI(MBB, MI, DebugLoc(), get(Opcode), DestReg)
       .addFrameIndex(FrameIndex)
       .addImm(0)
       .addMemOperand(MMO);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129262.452417.patch
Type: text/x-patch
Size: 1414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220813/560659aa/attachment.bin>


More information about the llvm-commits mailing list