[AVR] Remove debug location of spill/reload instructions

Reviewed By: MatzeB, benshi001

Differential Revision: https://reviews.llvm.org/D129262
This commit is contained in:
Liqin.Weng 2022-08-13 20:57:22 +08:00 committed by Ben Shi
parent 94b62a1d50
commit 8a12606a7e
1 changed files with 2 additions and 12 deletions

View File

@ -135,11 +135,6 @@ void AVRInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
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 @@ void AVRInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
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 @@ void AVRInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
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 @@ void AVRInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
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);