mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Remove most of the TargetMachine::getSubtarget/getSubtargetImpl
calls that don't take a Function argument from Mips. Notable exceptions: the AsmPrinter and MipsTargetObjectFile. The latter needs to be fixed, and the former will be fixed when the general AsmPrinter changes happen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227512 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -36,7 +36,7 @@ void Mips16FrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
MachineBasicBlock &MBB = MF.front();
|
||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
const Mips16InstrInfo &TII =
|
||||
*static_cast<const Mips16InstrInfo *>(MF.getSubtarget().getInstrInfo());
|
||||
*static_cast<const Mips16InstrInfo *>(STI.getInstrInfo());
|
||||
MachineBasicBlock::iterator MBBI = MBB.begin();
|
||||
DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
||||
uint64_t StackSize = MFI->getStackSize();
|
||||
@@ -84,7 +84,7 @@ void Mips16FrameLowering::emitEpilogue(MachineFunction &MF,
|
||||
MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
|
||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
const Mips16InstrInfo &TII =
|
||||
*static_cast<const Mips16InstrInfo *>(MF.getSubtarget().getInstrInfo());
|
||||
*static_cast<const Mips16InstrInfo *>(STI.getInstrInfo());
|
||||
DebugLoc dl = MBBI->getDebugLoc();
|
||||
uint64_t StackSize = MFI->getStackSize();
|
||||
|
||||
@@ -154,7 +154,7 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
|
||||
Amount = -Amount;
|
||||
|
||||
const Mips16InstrInfo &TII =
|
||||
*static_cast<const Mips16InstrInfo *>(MF.getSubtarget().getInstrInfo());
|
||||
*static_cast<const Mips16InstrInfo *>(STI.getInstrInfo());
|
||||
|
||||
TII.adjustStackPtr(Mips::SP, Amount, MBB, I);
|
||||
}
|
||||
@@ -174,7 +174,7 @@ void Mips16FrameLowering::
|
||||
processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
||||
RegScavenger *RS) const {
|
||||
const Mips16InstrInfo &TII =
|
||||
*static_cast<const Mips16InstrInfo *>(MF.getSubtarget().getInstrInfo());
|
||||
*static_cast<const Mips16InstrInfo *>(STI.getInstrInfo());
|
||||
const MipsRegisterInfo &RI = TII.getRegisterInfo();
|
||||
const BitVector Reserved = RI.getReservedRegs(MF);
|
||||
bool SaveS2 = Reserved[Mips::S2];
|
||||
|
Reference in New Issue
Block a user