[X86] Use new Flags argument to storeRegToStackSlot to simplify code. NFC (#124658)
Use the Flags argument to add FrameSetup directly instead of walking backwards to add the flag after the call.
This commit is contained in:
parent
7fff2527f8
commit
27e01d1d74
@ -3062,10 +3062,7 @@ bool X86FrameLowering::spillCalleeSavedRegisters(
|
||||
const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg, VT);
|
||||
|
||||
TII.storeRegToStackSlot(MBB, MI, Reg, true, I.getFrameIdx(), RC, TRI,
|
||||
Register());
|
||||
--MI;
|
||||
MI->setFlag(MachineInstr::FrameSetup);
|
||||
++MI;
|
||||
Register(), MachineInstr::FrameSetup);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -4801,7 +4801,8 @@ void X86InstrInfo::storeRegToStackSlot(
|
||||
loadStoreTileReg(MBB, MI, Opc, SrcReg, FrameIdx, isKill);
|
||||
else
|
||||
addFrameReference(BuildMI(MBB, MI, DebugLoc(), get(Opc)), FrameIdx)
|
||||
.addReg(SrcReg, getKillRegState(isKill));
|
||||
.addReg(SrcReg, getKillRegState(isKill))
|
||||
.setMIFlag(Flags);
|
||||
}
|
||||
|
||||
void X86InstrInfo::loadRegFromStackSlot(
|
||||
@ -4821,8 +4822,8 @@ void X86InstrInfo::loadRegFromStackSlot(
|
||||
if (isAMXOpcode(Opc))
|
||||
loadStoreTileReg(MBB, MI, Opc, DestReg, FrameIdx);
|
||||
else
|
||||
addFrameReference(BuildMI(MBB, MI, DebugLoc(), get(Opc), DestReg),
|
||||
FrameIdx);
|
||||
addFrameReference(BuildMI(MBB, MI, DebugLoc(), get(Opc), DestReg), FrameIdx)
|
||||
.setMIFlag(Flags);
|
||||
}
|
||||
|
||||
bool X86InstrInfo::analyzeCompare(const MachineInstr &MI, Register &SrcReg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user