From 93f0a823bfce76572432a11bf9aeb1803b78d3e5 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Sat, 12 May 2012 03:21:18 +0000 Subject: [PATCH] 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 --- lib/Target/Mips/MipsRegisterInfo.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/Target/Mips/MipsRegisterInfo.cpp b/lib/Target/Mips/MipsRegisterInfo.cpp index 37b0ed2666f..5fdeda92ecb 100644 --- a/lib/Target/Mips/MipsRegisterInfo.cpp +++ b/lib/Target/Mips/MipsRegisterInfo.cpp @@ -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()->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;