projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
00418ea
)
Do not add the pass that restores $gp if target is Mips64.
author
Akira Hatanaka
<ahatanak@gmail.com>
Tue, 27 Sep 2011 16:58:43 +0000
(16:58 +0000)
committer
Akira Hatanaka
<ahatanak@gmail.com>
Tue, 27 Sep 2011 16:58:43 +0000
(16:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140607
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/Mips/MipsTargetMachine.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/Mips/MipsTargetMachine.cpp
b/lib/Target/Mips/MipsTargetMachine.cpp
index 25211d472f07ec1f906c2327e8cd6c79d558327d..a318f81352af76f1016e25378dda495a192d7e04 100644
(file)
--- a/
lib/Target/Mips/MipsTargetMachine.cpp
+++ b/
lib/Target/Mips/MipsTargetMachine.cpp
@@
-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;
}