summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMRegisterInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-01-31 23:17:29 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-01-31 23:17:29 +0000
commitb0ff625a318e43a2a26543f9c97c283e2af2c007 (patch)
tree8246cc36c48f76b6df7a6ba16a20b088676c76a1 /llvm/lib/Target/ARM/ARMRegisterInfo.cpp
parentdee14b50e400e650f3516d0a3e9212d4fbcb9fa5 (diff)
downloadbcm5719-llvm-b0ff625a318e43a2a26543f9c97c283e2af2c007.tar.gz
bcm5719-llvm-b0ff625a318e43a2a26543f9c97c283e2af2c007.zip
Don't want to add FramePtr to callee save spill list twice.
llvm-svn: 33727
Diffstat (limited to 'llvm/lib/Target/ARM/ARMRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMRegisterInfo.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMRegisterInfo.cpp
index 4d48a7a0780..d76aedb0afd 100644
--- a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMRegisterInfo.cpp
@@ -881,13 +881,7 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const {
}
}
- if (hasFP(MF)) {
- MF.changePhyRegUsed(FramePtr, true);
- NumGPRSpills++;
- CanEliminateFrame = false;
- }
-
- if (!CanEliminateFrame) {
+ if (!CanEliminateFrame || hasFP(MF)) {
AFI->setHasStackFrame(true);
// If LR is not spilled, but at least one of R4, R5, R6, and R7 is spilled.
@@ -902,7 +896,7 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const {
// Darwin ABI requires FP to point to the stack slot that contains the
// previous FP.
- if (STI.isTargetDarwin()) {
+ if (STI.isTargetDarwin() || hasFP(MF)) {
MF.changePhyRegUsed(FramePtr, true);
NumGPRSpills++;
}
OpenPOWER on IntegriCloud