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::
|
bool ARMBaseRegisterInfo::
|
||||||
canSimplifyCallFramePseudos(MachineFunction &MF) const {
|
canSimplifyCallFramePseudos(MachineFunction &MF) const {
|
||||||
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
|
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
|
||||||
return hasReservedCallFrame(MF) || (AFI->isThumb1OnlyFunction() && hasFP(MF));
|
return hasReservedCallFrame(MF) || MF.getFrameInfo()->hasVarSizedObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -450,9 +450,9 @@ Thumb1RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
|
||||||
Offset -= AFI->getGPRCalleeSavedArea1Offset();
|
Offset -= AFI->getGPRCalleeSavedArea1Offset();
|
||||||
else if (AFI->isGPRCalleeSavedArea2Frame(FrameIndex))
|
else if (AFI->isGPRCalleeSavedArea2Frame(FrameIndex))
|
||||||
Offset -= AFI->getGPRCalleeSavedArea2Offset();
|
Offset -= AFI->getGPRCalleeSavedArea2Offset();
|
||||||
else if (hasFP(MF)) {
|
else if (MF.getFrameInfo()->hasVarSizedObjects()) {
|
||||||
assert(SPAdj == 0 && "Unexpected");
|
assert(SPAdj == 0 && hasFP(MF) && "Unexpected");
|
||||||
// There is alloca()'s in this function, must reference off the frame
|
// There are alloca()'s in this function, must reference off the frame
|
||||||
// pointer instead.
|
// pointer instead.
|
||||||
FrameReg = getFrameRegister(MF);
|
FrameReg = getFrameRegister(MF);
|
||||||
Offset -= AFI->getFramePtrSpillOffset();
|
Offset -= AFI->getFramePtrSpillOffset();
|
||||||
|
|
Loading…
Reference in New Issue