diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-11 02:38:11 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-11 02:38:11 +0000 |
| commit | 1b09836bc3b543a06486e8989ce081f274a380a3 (patch) | |
| tree | 0d1704e2f1b5f80ecc9751af3f076add6a6d1fcc /llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp | |
| parent | 639890222e83c3b17c668708316fc6bcf9c413e8 (diff) | |
| download | bcm5719-llvm-1b09836bc3b543a06486e8989ce081f274a380a3.tar.gz bcm5719-llvm-1b09836bc3b543a06486e8989ce081f274a380a3.zip | |
Change getFrameMoves to return a const reference.
To add a frame now there is a dedicated addFrameMove which also takes
care of constructing the move itself.
llvm-svn: 181657
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp b/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp index fda33dee48f..ab1d45f1288 100644 --- a/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp +++ b/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp @@ -297,7 +297,6 @@ void SystemZFrameLowering::emitPrologue(MachineFunction &MF) const { SystemZMachineFunctionInfo *ZFI = MF.getInfo<SystemZMachineFunctionInfo>(); MachineBasicBlock::iterator MBBI = MBB.begin(); MachineModuleInfo &MMI = MF.getMMI(); - std::vector<MachineMove> &Moves = MMI.getFrameMoves(); const std::vector<CalleeSavedInfo> &CSI = MFFrame->getCalleeSavedInfo(); bool HasFP = hasFP(MF); DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); @@ -323,7 +322,7 @@ void SystemZFrameLowering::emitPrologue(MachineFunction &MF) const { int64_t Offset = SPOffsetFromCFA + RegSpillOffsets[Reg]; MachineLocation StackSlot(MachineLocation::VirtualFP, Offset); MachineLocation RegValue(Reg); - Moves.push_back(MachineMove(GPRSaveLabel, StackSlot, RegValue)); + MMI.addFrameMove(GPRSaveLabel, StackSlot, RegValue); } } } @@ -340,7 +339,7 @@ void SystemZFrameLowering::emitPrologue(MachineFunction &MF) const { .addSym(AdjustSPLabel); MachineLocation FPDest(MachineLocation::VirtualFP); MachineLocation FPSrc(MachineLocation::VirtualFP, SPOffsetFromCFA + Delta); - Moves.push_back(MachineMove(AdjustSPLabel, FPDest, FPSrc)); + MMI.addFrameMove(AdjustSPLabel, FPDest, FPSrc); SPOffsetFromCFA += Delta; } @@ -355,7 +354,7 @@ void SystemZFrameLowering::emitPrologue(MachineFunction &MF) const { .addSym(SetFPLabel); MachineLocation HardFP(SystemZ::R11D); MachineLocation VirtualFP(MachineLocation::VirtualFP); - Moves.push_back(MachineMove(SetFPLabel, HardFP, VirtualFP)); + MMI.addFrameMove(SetFPLabel, HardFP, VirtualFP); // Mark the FramePtr as live at the beginning of every block except // the entry block. (We'll have marked R11 as live on entry when @@ -386,7 +385,7 @@ void SystemZFrameLowering::emitPrologue(MachineFunction &MF) const { MachineLocation Slot(MachineLocation::VirtualFP, SPOffsetFromCFA + Offset); MachineLocation RegValue(Reg); - Moves.push_back(MachineMove(FPRSaveLabel, Slot, RegValue)); + MMI.addFrameMove(FPRSaveLabel, Slot, RegValue); } } // Complete the CFI for the FPR saves, modelling them as taking effect |

