handle very large call frames when require SPAdj != 0 for Thumb1

llvm-svn: 97013
This commit is contained in:
Jim Grosbach 2010-02-24 02:15:43 +00:00
parent 6ad4bcb0da
commit 2921550485
2 changed files with 4 additions and 4 deletions

View File

@ -1092,7 +1092,7 @@ hasReservedCallFrame(MachineFunction &MF) const {
bool ARMBaseRegisterInfo::
canSimplifyCallFramePseudos(MachineFunction &MF) const {
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
return hasReservedCallFrame(MF) || (AFI->isThumb1OnlyFunction() && hasFP(MF));
return hasReservedCallFrame(MF) || MF.getFrameInfo()->hasVarSizedObjects();
}
static void

View File

@ -450,9 +450,9 @@ Thumb1RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
Offset -= AFI->getGPRCalleeSavedArea1Offset();
else if (AFI->isGPRCalleeSavedArea2Frame(FrameIndex))
Offset -= AFI->getGPRCalleeSavedArea2Offset();
else if (hasFP(MF)) {
assert(SPAdj == 0 && "Unexpected");
// There is alloca()'s in this function, must reference off the frame
else if (MF.getFrameInfo()->hasVarSizedObjects()) {
assert(SPAdj == 0 && hasFP(MF) && "Unexpected");
// There are alloca()'s in this function, must reference off the frame
// pointer instead.
FrameReg = getFrameRegister(MF);
Offset -= AFI->getFramePtrSpillOffset();