[PEI] Fix refactoring from r308664

llvm-svn: 308666
This commit is contained in:
Francis Visoiu Mistrih 2017-07-20 20:31:44 +00:00
parent d41ac895bb
commit 39aa5dbbf5
1 changed files with 1 additions and 1 deletions

View File

@ -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);