Stop reserving register $gp. Do not call isGPFI to check whether a frame object

is the $gp save slot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156694 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka 2012-05-12 03:21:18 +00:00
parent acf411bd4c
commit 93f0a823bf

View File

@ -118,12 +118,6 @@ getReservedRegs(const MachineFunction &MF) const {
Reserved.set(*Reg);
}
// If GP is dedicated as a global base register, reserve it.
if (MF.getInfo<MipsFunctionInfo>()->globalBaseRegFixed()) {
Reserved.set(Mips::GP);
Reserved.set(Mips::GP_64);
}
// Reserve FP if this function should have a dedicated frame pointer register.
if (MF.getTarget().getFrameLowering()->hasFP(MF)) {
Reserved.set(Mips::FP);
@ -217,8 +211,7 @@ eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
// incoming argument, callee-saved register location or local variable.
int64_t Offset;
if (MipsFI->isOutArgFI(FrameIndex) || MipsFI->isGPFI(FrameIndex) ||
MipsFI->isDynAllocFI(FrameIndex))
if (MipsFI->isOutArgFI(FrameIndex) || MipsFI->isDynAllocFI(FrameIndex))
Offset = spOffset;
else
Offset = spOffset + (int64_t)stackSize;