mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Remove unnecessary Implicit Defs. Since r0 is not in allocation, we do not
have to inform the register allocator it might be stepped on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9def6cc378
commit
340f290783
@ -84,10 +84,8 @@ PPC32RegisterInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
unsigned OC = Opcode[getIdx(getClass(SrcReg))];
|
||||
if (SrcReg == PPC::LR) {
|
||||
BuildMI(MBB, MI, PPC::MFLR, 1, PPC::R11).addReg(PPC::LR);
|
||||
BuildMI(MBB, MI, PPC::IMPLICIT_DEF, 0, PPC::R0);
|
||||
addFrameReference(BuildMI(MBB, MI, OC, 3).addReg(PPC::R11),FrameIdx);
|
||||
} else {
|
||||
BuildMI(MBB, MI, PPC::IMPLICIT_DEF, 0, PPC::R0);
|
||||
addFrameReference(BuildMI(MBB, MI, OC, 3).addReg(SrcReg),FrameIdx);
|
||||
}
|
||||
}
|
||||
@ -101,11 +99,9 @@ PPC32RegisterInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
};
|
||||
unsigned OC = Opcode[getIdx(getClass(DestReg))];
|
||||
if (DestReg == PPC::LR) {
|
||||
BuildMI(MBB, MI, PPC::IMPLICIT_DEF, 0, PPC::R0);
|
||||
addFrameReference(BuildMI(MBB, MI, OC, 2, PPC::R11), FrameIdx);
|
||||
BuildMI(MBB, MI, PPC::MTLR, 1).addReg(PPC::R11);
|
||||
} else {
|
||||
BuildMI(MBB, MI, PPC::IMPLICIT_DEF, 0, PPC::R0);
|
||||
addFrameReference(BuildMI(MBB, MI, OC, 2, DestReg), FrameIdx);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user