summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-01-29 23:27:36 +0000
committerEric Christopher <echristo@gmail.com>2015-01-29 23:27:36 +0000
commit96e72c6ab168914d2323e15579a2593edb8b6515 (patch)
tree090851819b44d9f22277657efbc3dc502f23c73a /llvm/lib/Target/Mips/Mips16RegisterInfo.cpp
parente4b705bc1cc6140ded88c3ac685f4398b80888d0 (diff)
downloadbcm5719-llvm-96e72c6ab168914d2323e15579a2593edb8b6515.tar.gz
bcm5719-llvm-96e72c6ab168914d2323e15579a2593edb8b6515.zip
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. llvm-svn: 227512
Diffstat (limited to 'llvm/lib/Target/Mips/Mips16RegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/Mips/Mips16RegisterInfo.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp b/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp
index 0bb452a3f7d..c45acc4bcf4 100644
--- a/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp
+++ b/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp
@@ -65,7 +65,7 @@ bool Mips16RegisterInfo::saveScavengerRegister
const TargetRegisterClass *RC,
unsigned Reg) const {
DebugLoc DL;
- const TargetInstrInfo &TII = *MBB.getParent()->getSubtarget().getInstrInfo();
+ const TargetInstrInfo &TII = *Subtarget.getInstrInfo();
TII.copyPhysReg(MBB, I, DL, Mips::T0, Reg, true);
TII.copyPhysReg(MBB, UseMI, DL, Reg, Mips::T0, true);
return true;
@@ -106,7 +106,7 @@ void Mips16RegisterInfo::eliminateFI(MachineBasicBlock::iterator II,
if (FrameIndex >= MinCSFI && FrameIndex <= MaxCSFI)
FrameReg = Mips::SP;
else {
- const TargetFrameLowering *TFI = MF.getSubtarget().getFrameLowering();
+ const TargetFrameLowering *TFI = Subtarget.getFrameLowering();
if (TFI->hasFP(MF)) {
FrameReg = Mips::S0;
}
@@ -140,8 +140,7 @@ void Mips16RegisterInfo::eliminateFI(MachineBasicBlock::iterator II,
DebugLoc DL = II->getDebugLoc();
unsigned NewImm;
const Mips16InstrInfo &TII =
- *static_cast<const Mips16InstrInfo *>(
- MBB.getParent()->getSubtarget().getInstrInfo());
+ *static_cast<const Mips16InstrInfo *>(Subtarget.getInstrInfo());
FrameReg = TII.loadImmediate(FrameReg, Offset, MBB, II, DL, NewImm);
Offset = SignExtend64<16>(NewImm);
IsKill = true;
OpenPOWER on IntegriCloud