diff options
| author | Jim Grosbach <grosbach@apple.com> | 2010-08-04 22:46:09 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2010-08-04 22:46:09 +0000 |
| commit | 8aaadea8ef135678bbb9520e074e5e68eeedcb7f (patch) | |
| tree | 1cae970e7434ccc07eeba1bbe339a74e7e7f1239 /llvm/lib | |
| parent | 39d0f57cab1d85e0eeae298a08cff6510f30b371 (diff) | |
| download | bcm5719-llvm-8aaadea8ef135678bbb9520e074e5e68eeedcb7f.tar.gz bcm5719-llvm-8aaadea8ef135678bbb9520e074e5e68eeedcb7f.zip | |
and back in. false alarm on the tests from another unrelated local change.
llvm-svn: 110269
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp index cd37633d967..855e07232d3 100644 --- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp @@ -851,13 +851,18 @@ ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF, // slot of the previous FP. Also, if we have variable sized objects in the // function, stack slot references will often be negative, and some of // our instructions are positive-offset only, so conservatively consider - // that case to want a spill slot (or register) as well. + // that case to want a spill slot (or register) as well. Similarly, if + // the function adjusts the stack pointer during execution and the + // adjustments aren't already part of our stack size estimate, our offset + // calculations may be off, so be conservative. // FIXME: We could add logic to be more precise about negative offsets // and which instructions will need a scratch register for them. Is it // worth the effort and added fragility? bool BigStack = (RS && (estimateStackSize(MF) + (hasFP(MF) ? 4:0) >= - estimateRSStackSizeLimit(MF))) || MFI->hasVarSizedObjects(); + estimateRSStackSizeLimit(MF)) + || MFI->hasVarSizedObjects() + || (MFI->adjustsStack() && !canSimplifyCallFramePseudos(MF))); bool ExtraCSSpill = false; if (BigStack || !CanEliminateFrame || cannotEliminateFrame(MF)) { |

