mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Eliminate the stack slot used to save the global base register.
The long branch pass (fixed in r160601) no longer uses the global base register to compute addresses of branch destinations, so it is not necessary to reserve a slot on the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160703 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -113,11 +113,7 @@ void MipsFrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
// First, compute final stack size.
|
||||
unsigned StackAlign = getStackAlignment();
|
||||
uint64_t StackSize = RoundUpToAlignment(MFI->getStackSize(), StackAlign);
|
||||
|
||||
if (MipsFI->globalBaseRegSet())
|
||||
StackSize += MFI->getObjectOffset(MipsFI->getGlobalRegFI()) + StackAlign;
|
||||
else
|
||||
StackSize += RoundUpToAlignment(MipsFI->getMaxCallFrameSize(), StackAlign);
|
||||
StackSize += RoundUpToAlignment(MipsFI->getMaxCallFrameSize(), StackAlign);
|
||||
|
||||
// Update stack size
|
||||
MFI->setStackSize(StackSize);
|
||||
|
||||
Reference in New Issue
Block a user