Revert "[VENTUS][fix] No need to spill/restore callee saved registers for kernel function"

This reverts commit 85df9000bb.
This commit is contained in:
zhoujing 2023-08-27 15:47:26 +08:00
parent 2d8205dd54
commit 6491bdfb02
1 changed files with 0 additions and 6 deletions

View File

@ -735,9 +735,6 @@ bool RISCVFrameLowering::spillCalleeSavedRegisters(
return true;
MachineFunction *MF = MBB.getParent();
// For kernel function, no need to spill callee saved register
if(MF->getInfo<RISCVMachineFunctionInfo>()->isEntryFunction())
return true;
const TargetInstrInfo &TII = *MF->getSubtarget().getInstrInfo();
DebugLoc DL;
if (MI != MBB.end() && !MI->isDebugInstr())
@ -785,9 +782,6 @@ bool RISCVFrameLowering::restoreCalleeSavedRegisters(
return true;
MachineFunction *MF = MBB.getParent();
// If kernel function, no need to restore CalleeSavedRegisters
if(MF->getInfo<RISCVMachineFunctionInfo>()->isEntryFunction())
return true;
const TargetInstrInfo &TII = *MF->getSubtarget().getInstrInfo();
DebugLoc DL;
if (MI != MBB.end() && !MI->isDebugInstr())