From 39aa5dbbf59373fd9178b62fd4f4f7b620f7ef88 Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Thu, 20 Jul 2017 20:31:44 +0000 Subject: [PATCH] [PEI] Fix refactoring from r308664 llvm-svn: 308666 --- llvm/lib/CodeGen/PrologEpilogInserter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index d6595d202bd8..b9a1010e46f9 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -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 CSI = MFI.getCalleeSavedInfo(); MinCSFrameIndex = std::numeric_limits::max(); MaxCSFrameIndex = 0; @@ -534,6 +533,7 @@ static void doSpillCalleeSavedRegs(MachineFunction &Fn, RegScavenger *RS, if (!F->hasFnAttribute(Attribute::Naked)) { MFI.setCalleeSavedInfoValid(true); + ArrayRef CSI = MFI.getCalleeSavedInfo(); if (!CSI.empty()) { for (MachineBasicBlock *SaveBlock : SaveBlocks) { insertCSRSaves(*SaveBlock, CSI);