Do not add the pass which restores $gp after every function call.
authorAkira Hatanaka <ahatanaka@mips.com>
Sat, 12 May 2012 03:19:51 +0000 (03:19 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Sat, 12 May 2012 03:19:51 +0000 (03:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156693 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MipsTargetMachine.cpp

index 858723bad9d7a384c048844831539b418b9317ae..1e6e8527267406d7aee59b246b9dcb1e9c6f3654 100644 (file)
@@ -105,7 +105,6 @@ public:
   }
 
   virtual bool addInstSelector();
-  virtual bool addPreRegAlloc();
   virtual bool addPreSched2();
   virtual bool addPreEmitPass();
 };
@@ -130,14 +129,6 @@ bool MipsPassConfig::addPreEmitPass() {
   return true;
 }
 
-bool MipsPassConfig::addPreRegAlloc() {
-  // Do not restore $gp if target is Mips64.
-  // In N32/64, $gp is a callee-saved register.
-  if (!getMipsSubtarget().hasMips64())
-    PM->add(createMipsEmitGPRestorePass(getMipsTargetMachine()));
-  return true;
-}
-
 bool MipsPassConfig::addPreSched2() {
   PM->add(createMipsExpandPseudoPass(getMipsTargetMachine()));
   return true;