mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181657 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,7 +40,6 @@ void Mips16FrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
if (StackSize == 0 && !MFI->adjustsStack()) return;
|
||||
|
||||
MachineModuleInfo &MMI = MF.getMMI();
|
||||
std::vector<MachineMove> &Moves = MMI.getFrameMoves();
|
||||
MachineLocation DstML, SrcML;
|
||||
|
||||
// Adjust stack.
|
||||
@@ -52,22 +51,22 @@ void Mips16FrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
TII.get(TargetOpcode::PROLOG_LABEL)).addSym(AdjustSPLabel);
|
||||
DstML = MachineLocation(MachineLocation::VirtualFP);
|
||||
SrcML = MachineLocation(MachineLocation::VirtualFP, -StackSize);
|
||||
Moves.push_back(MachineMove(AdjustSPLabel, DstML, SrcML));
|
||||
MMI.addFrameMove(AdjustSPLabel, DstML, SrcML);
|
||||
|
||||
MCSymbol *CSLabel = MMI.getContext().CreateTempSymbol();
|
||||
BuildMI(MBB, MBBI, dl,
|
||||
TII.get(TargetOpcode::PROLOG_LABEL)).addSym(CSLabel);
|
||||
DstML = MachineLocation(MachineLocation::VirtualFP, -8);
|
||||
SrcML = MachineLocation(Mips::S1);
|
||||
Moves.push_back(MachineMove(CSLabel, DstML, SrcML));
|
||||
MMI.addFrameMove(CSLabel, DstML, SrcML);
|
||||
|
||||
DstML = MachineLocation(MachineLocation::VirtualFP, -12);
|
||||
SrcML = MachineLocation(Mips::S0);
|
||||
Moves.push_back(MachineMove(CSLabel, DstML, SrcML));
|
||||
MMI.addFrameMove(CSLabel, DstML, SrcML);
|
||||
|
||||
DstML = MachineLocation(MachineLocation::VirtualFP, -4);
|
||||
SrcML = MachineLocation(Mips::RA);
|
||||
Moves.push_back(MachineMove(CSLabel, DstML, SrcML));
|
||||
MMI.addFrameMove(CSLabel, DstML, SrcML);
|
||||
|
||||
if (hasFP(MF))
|
||||
BuildMI(MBB, MBBI, dl, TII.get(Mips::MoveR3216), Mips::S0)
|
||||
|
Reference in New Issue
Block a user