mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 07:17:32 +00:00
Radar 7636153. In the presence of large call frames, it's not sufficient
for ARM to just check if a function has a FP to determine if it's safe to simplify the stack adjustment pseudo ops prior to eliminating frame indices. Allow targets to override the default behavior and does so for ARM and Thumb2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -175,9 +175,10 @@ void PEI::calculateCallsInformation(MachineFunction &Fn) {
|
||||
MachineBasicBlock::iterator I = *i;
|
||||
|
||||
// If call frames are not being included as part of the stack frame, and
|
||||
// there is no dynamic allocation (therefore referencing frame slots off
|
||||
// sp), leave the pseudo ops alone. We'll eliminate them later.
|
||||
if (RegInfo->hasReservedCallFrame(Fn) || RegInfo->hasFP(Fn))
|
||||
// the target doesn't indicate otherwise, remove the call frame pseudos
|
||||
// here. The sub/add sp instruction pairs are still inserted, but we don't
|
||||
// need to track the SP adjustment for frame index elimination.
|
||||
if (RegInfo->canSimplifyCallFramePseudos(Fn))
|
||||
RegInfo->eliminateCallFramePseudoInstr(Fn, *I->getParent(), I);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user