diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2007-01-29 22:22:24 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-29 22:22:24 +0000 |
| commit | 43e8518d8bc60106950e3bc0c6359cb8c5f96175 (patch) | |
| tree | b01a3a7b7740c4136b6b9c14379bc5384e60dd9e /llvm/lib/Target/ARM/ARMRegisterInfo.cpp | |
| parent | b8d8b829508d96414cc2ffbddce1d15388c3ca2f (diff) | |
| download | bcm5719-llvm-43e8518d8bc60106950e3bc0c6359cb8c5f96175.tar.gz bcm5719-llvm-43e8518d8bc60106950e3bc0c6359cb8c5f96175.zip | |
Remember if LR register has been spilled in this function.
llvm-svn: 33632
Diffstat (limited to 'llvm/lib/Target/ARM/ARMRegisterInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMRegisterInfo.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMRegisterInfo.cpp index 912d17adc13..2accaf890e6 100644 --- a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp +++ b/llvm/lib/Target/ARM/ARMRegisterInfo.cpp @@ -769,13 +769,14 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const { } } + ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>(); if (!CanEliminateFrame) { - ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>(); AFI->setHasStackFrame(true); // If LR is not spilled, but at least one of R4, R5, R6, and R7 is spilled. // Spill LR as well so we can fold BX_RET to the registers restore (LDM). if (!LRSpilled && CS1Spilled) { + LRSpilled = true; MF.changePhyRegUsed(ARM::LR, true); NumGPRSpills++; UnspilledCS1GPRs.erase(std::find(UnspilledCS1GPRs.begin(), @@ -798,6 +799,9 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const { MF.changePhyRegUsed(UnspilledCS2GPRs.front(), true); } } + + // Remembe if LR has been spilled. + AFI->setLRIsSpilled(LRSpilled); } /// Move iterator pass the next bunch of callee save load / store ops for |

