forked from OSchip/llvm-project
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. llvm-svn: 61214
This commit is contained in:
parent
0ab1144c79
commit
975f78ae79
|
@ -745,6 +745,11 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||
BuildMI(MBB, MBBI, TII.get(Is64Bit ? X86::MOV64rr : X86::MOV32rr), FramePtr)
|
||||
.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
|
||||
if (needsStackRealignment(MF))
|
||||
BuildMI(MBB, MBBI,
|
||||
|
|
Loading…
Reference in New Issue