[llvm-commits] [llvm] r156694 - /llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp

Akira Hatanaka ahatanaka at mips.com
Fri May 11 20:21:19 PDT 2012


Author: ahatanak
Date: Fri May 11 22:21:18 2012
New Revision: 156694

URL: http://llvm.org/viewvc/llvm-project?rev=156694&view=rev
Log:
Stop reserving register $gp. Do not call isGPFI to check whether a frame object
is the $gp save slot.

Modified:
    llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp?rev=156694&r1=156693&r2=156694&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsRegisterInfo.cpp Fri May 11 22:21:18 2012
@@ -118,12 +118,6 @@
       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 @@
   //   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;





More information about the llvm-commits mailing list