diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCFrameLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp index 15466ba9876c..c0860fcdaa3b 100644 --- a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp @@ -2170,8 +2170,8 @@ void PPCFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF, // The Floating-point register save area is right below the back chain word // of the previous stack frame. if (HasFPSaveArea) { - for (unsigned i = 0, e = FPRegs.size(); i != e; ++i) { - int FI = FPRegs[i].getFrameIdx(); + for (const CalleeSavedInfo &FPReg : FPRegs) { + int FI = FPReg.getFrameIdx(); MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); } @@ -2219,18 +2219,18 @@ void PPCFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF, if (HasGPSaveArea || HasG8SaveArea) { // Move general register save area spill slots down, taking into account // the size of the Floating-point register save area. - for (unsigned i = 0, e = GPRegs.size(); i != e; ++i) { - if (!GPRegs[i].isSpilledToReg()) { - int FI = GPRegs[i].getFrameIdx(); + for (const CalleeSavedInfo &GPReg : GPRegs) { + if (!GPReg.isSpilledToReg()) { + int FI = GPReg.getFrameIdx(); MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); } } // Move general register save area spill slots down, taking into account // the size of the Floating-point register save area. - for (unsigned i = 0, e = G8Regs.size(); i != e; ++i) { - if (!G8Regs[i].isSpilledToReg()) { - int FI = G8Regs[i].getFrameIdx(); + for (const CalleeSavedInfo &G8Reg : G8Regs) { + if (!G8Reg.isSpilledToReg()) { + int FI = G8Reg.getFrameIdx(); MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); } } @@ -2272,8 +2272,8 @@ void PPCFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF, assert(LowerBound <= 0 && "Expect LowerBound have a non-positive value!"); LowerBound &= ~(15); - for (unsigned i = 0, e = VRegs.size(); i != e; ++i) { - int FI = VRegs[i].getFrameIdx(); + for (const CalleeSavedInfo &VReg : VRegs) { + int FI = VReg.getFrameIdx(); MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI)); } |
