forked from OSchip/llvm-project
handle very large call frames when require SPAdj != 0 for Thumb1
llvm-svn: 97013
This commit is contained in:
parent
6ad4bcb0da
commit
2921550485
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue