mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-16 16:16:45 +00:00
When the function is doing dynamic stack realignment, the spill slot will be
indexed via the stack pointer, even if a frame pointer is present. Update the heuristic to place it nearest the stack pointer in that case, rather than nearest the frame pointer. llvm-svn: 85474
This commit is contained in:
parent
bcb6d87c9d
commit
220e39263c
@ -542,7 +542,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
|
||||
// Make sure the special register scavenging spill slot is closest to the
|
||||
// frame pointer if a frame pointer is required.
|
||||
const TargetRegisterInfo *RegInfo = Fn.getTarget().getRegisterInfo();
|
||||
if (RS && RegInfo->hasFP(Fn)) {
|
||||
if (RS && RegInfo->hasFP(Fn) && !RegInfo->needsStackRealignment(Fn)) {
|
||||
int SFI = RS->getScavengingFrameIndex();
|
||||
if (SFI >= 0)
|
||||
AdjustStackOffset(FFI, SFI, StackGrowsDown, Offset, MaxAlign);
|
||||
@ -571,7 +571,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
|
||||
|
||||
// Make sure the special register scavenging spill slot is closest to the
|
||||
// stack pointer.
|
||||
if (RS && !RegInfo->hasFP(Fn)) {
|
||||
if (RS && (!RegInfo->hasFP(Fn) || RegInfo->needsStackRealignment(Fn))) {
|
||||
int SFI = RS->getScavengingFrameIndex();
|
||||
if (SFI >= 0)
|
||||
AdjustStackOffset(FFI, SFI, StackGrowsDown, Offset, MaxAlign);
|
||||
|
Loading…
Reference in New Issue
Block a user