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