forked from OSchip/llvm-project
Do not add the pass that restores $gp if target is Mips64.
llvm-svn: 140607
This commit is contained in:
parent
86de1a666d
commit
ff5d0965b0
|
@ -96,7 +96,10 @@ addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel)
|
|||
|
||||
bool MipsTargetMachine::
|
||||
addPreRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel) {
|
||||
PM.add(createMipsEmitGPRestorePass(*this));
|
||||
// Do not restore $gp if target is Mips64.
|
||||
// In N32/64, $gp is a callee-saved register.
|
||||
if (!Subtarget.hasMips64())
|
||||
PM.add(createMipsEmitGPRestorePass(*this));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue