mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
When setting up the frame pointer, add it as a live-in register to all
non-entry blocks, so that it doesn't appear use-before-def anywhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ccc839669
commit
34d6ad73e1
@ -745,6 +745,11 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
BuildMI(MBB, MBBI, TII.get(Is64Bit ? X86::MOV64rr : X86::MOV32rr), FramePtr)
|
BuildMI(MBB, MBBI, TII.get(Is64Bit ? X86::MOV64rr : X86::MOV32rr), FramePtr)
|
||||||
.addReg(StackPtr);
|
.addReg(StackPtr);
|
||||||
|
|
||||||
|
// Mark the FramePtr as live-in in every block except the entry.
|
||||||
|
for (MachineFunction::iterator I = next(MF.begin()), E = MF.end();
|
||||||
|
I != E; ++I)
|
||||||
|
I->addLiveIn(FramePtr);
|
||||||
|
|
||||||
// Realign stack
|
// Realign stack
|
||||||
if (needsStackRealignment(MF))
|
if (needsStackRealignment(MF))
|
||||||
BuildMI(MBB, MBBI,
|
BuildMI(MBB, MBBI,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user