@@ -503,7 +503,7 @@ Register SIRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
503
503
// functions, but never actually want to reference it when accessing our own
504
504
// frame. If we need a frame pointer we use it, but otherwise we can just use
505
505
// an immediate "0" which we represent by returning NoRegister.
506
- if (FuncInfo->isEntryFunction () || FuncInfo-> isChainFunction ()) {
506
+ if (FuncInfo->isBottomOfStack ()) {
507
507
return TFI->hasFP (MF) ? FuncInfo->getFrameOffsetReg () : Register ();
508
508
}
509
509
return TFI->hasFP (MF) ? FuncInfo->getFrameOffsetReg ()
@@ -738,7 +738,7 @@ bool SIRegisterInfo::shouldRealignStack(const MachineFunction &MF) const {
738
738
739
739
// FIXME: Should be able to specify the entry frame alignment per calling
740
740
// convention instead.
741
- if (Info->isEntryFunction () || Info-> isChainFunction ())
741
+ if (Info->isBottomOfStack ())
742
742
return false ;
743
743
744
744
return TargetRegisterInfo::shouldRealignStack (MF);
@@ -1649,7 +1649,7 @@ void SIRegisterInfo::buildSpillLoadStore(
1649
1649
if (UseVGPROffset && ScratchOffsetReg) {
1650
1650
MIB.addReg (ScratchOffsetReg);
1651
1651
} else {
1652
- assert (FuncInfo->isEntryFunction () || FuncInfo-> isChainFunction ());
1652
+ assert (FuncInfo->isBottomOfStack ());
1653
1653
MIB.addImm (0 );
1654
1654
}
1655
1655
}
@@ -2424,7 +2424,7 @@ bool SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
2424
2424
2425
2425
bool IsMUBUF = TII->isMUBUF (*MI);
2426
2426
2427
- if (!IsMUBUF && !MFI->isEntryFunction () && !MFI-> isChainFunction ()) {
2427
+ if (!IsMUBUF && !MFI->isBottomOfStack ()) {
2428
2428
// Convert to a swizzled stack address by scaling by the wave size.
2429
2429
// In an entry function/kernel the offset is already swizzled.
2430
2430
bool IsSALU = isSGPRClass (TII->getOpRegClass (*MI, FIOperandNum));
0 commit comments