forked from OSchip/llvm-project
parent
d41ac895bb
commit
39aa5dbbf5
|
@ -519,7 +519,6 @@ static void doSpillCalleeSavedRegs(MachineFunction &Fn, RegScavenger *RS,
|
|||
const Function *F = Fn.getFunction();
|
||||
const TargetFrameLowering *TFI = Fn.getSubtarget().getFrameLowering();
|
||||
MachineFrameInfo &MFI = Fn.getFrameInfo();
|
||||
ArrayRef<CalleeSavedInfo> CSI = MFI.getCalleeSavedInfo();
|
||||
MinCSFrameIndex = std::numeric_limits<unsigned>::max();
|
||||
MaxCSFrameIndex = 0;
|
||||
|
||||
|
@ -534,6 +533,7 @@ static void doSpillCalleeSavedRegs(MachineFunction &Fn, RegScavenger *RS,
|
|||
if (!F->hasFnAttribute(Attribute::Naked)) {
|
||||
MFI.setCalleeSavedInfoValid(true);
|
||||
|
||||
ArrayRef<CalleeSavedInfo> CSI = MFI.getCalleeSavedInfo();
|
||||
if (!CSI.empty()) {
|
||||
for (MachineBasicBlock *SaveBlock : SaveBlocks) {
|
||||
insertCSRSaves(*SaveBlock, CSI);
|
||||
|
|
Loading…
Reference in New Issue