Prevent instructions using $gp from being placed between a jalr and the instruction that restores the clobbered $gp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130847 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka
2011-05-04 17:54:27 +00:00
parent 597a7664e1
commit 6b7588e6c4
7 changed files with 125 additions and 12 deletions

View File

@ -76,6 +76,12 @@ addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel)
return true;
}
bool MipsTargetMachine::
addPreRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel) {
PM.add(createMipsEmitGPRestorePass(*this));
return true;
}
bool MipsTargetMachine::
addPostRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel) {
PM.add(createMipsExpandPseudoPass(*this));