diff options
author | Akira Hatanaka <ahatanak@gmail.com> | 2011-05-04 17:54:27 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanak@gmail.com> | 2011-05-04 17:54:27 +0000 |
commit | 6b7588e6c4f6f1a9ab2b5182fafaa95eeb56ca8d (patch) | |
tree | ce8641b51bd329cebd7bb0043678e9a43d1f3f38 /lib/Target/Mips/MipsTargetMachine.cpp | |
parent | 597a7664e1bbe2ea5f757eb6e853bd1d2fe98d6c (diff) |
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
Diffstat (limited to 'lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r-- | lib/Target/Mips/MipsTargetMachine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp index 53190b4600..9f5c2184ca 100644 --- a/lib/Target/Mips/MipsTargetMachine.cpp +++ b/lib/Target/Mips/MipsTargetMachine.cpp @@ -77,6 +77,12 @@ addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel) } 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)); return true; |