[Mips] Remove unnecessary casts (NFC) (#148392)
getRegisterInfo() already returns const MipsRegisterInfo *. Likewise, getInstrInfo() already returns const MipsInstrInfo *.
This commit is contained in:
parent
94fc76a360
commit
4462a420f8
@ -781,7 +781,7 @@ bool MicroMipsSizeReduce::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
Subtarget->hasMips32r6())
|
Subtarget->hasMips32r6())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
MipsII = static_cast<const MipsInstrInfo *>(Subtarget->getInstrInfo());
|
MipsII = Subtarget->getInstrInfo();
|
||||||
|
|
||||||
bool Modified = false;
|
bool Modified = false;
|
||||||
MachineFunction::iterator I = MF.begin(), E = MF.end();
|
MachineFunction::iterator I = MF.begin(), E = MF.end();
|
||||||
|
@ -941,7 +941,7 @@ bool MipsBranchExpansion::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
IsPIC = TM.isPositionIndependent();
|
IsPIC = TM.isPositionIndependent();
|
||||||
ABI = static_cast<const MipsTargetMachine &>(TM).getABI();
|
ABI = static_cast<const MipsTargetMachine &>(TM).getABI();
|
||||||
STI = &MF.getSubtarget<MipsSubtarget>();
|
STI = &MF.getSubtarget<MipsSubtarget>();
|
||||||
TII = static_cast<const MipsInstrInfo *>(STI->getInstrInfo());
|
TII = STI->getInstrInfo();
|
||||||
|
|
||||||
if (IsPIC && ABI.IsO32() &&
|
if (IsPIC && ABI.IsO32() &&
|
||||||
MF.getInfo<MipsFunctionInfo>()->globalBaseRegSet())
|
MF.getInfo<MipsFunctionInfo>()->globalBaseRegSet())
|
||||||
|
@ -403,8 +403,7 @@ void MipsSEFrameLowering::emitPrologue(MachineFunction &MF,
|
|||||||
|
|
||||||
const MipsSEInstrInfo &TII =
|
const MipsSEInstrInfo &TII =
|
||||||
*static_cast<const MipsSEInstrInfo *>(STI.getInstrInfo());
|
*static_cast<const MipsSEInstrInfo *>(STI.getInstrInfo());
|
||||||
const MipsRegisterInfo &RegInfo =
|
const MipsRegisterInfo &RegInfo = *STI.getRegisterInfo();
|
||||||
*static_cast<const MipsRegisterInfo *>(STI.getRegisterInfo());
|
|
||||||
|
|
||||||
MachineBasicBlock::iterator MBBI = MBB.begin();
|
MachineBasicBlock::iterator MBBI = MBB.begin();
|
||||||
DebugLoc dl;
|
DebugLoc dl;
|
||||||
@ -658,8 +657,7 @@ void MipsSEFrameLowering::emitEpilogue(MachineFunction &MF,
|
|||||||
|
|
||||||
const MipsSEInstrInfo &TII =
|
const MipsSEInstrInfo &TII =
|
||||||
*static_cast<const MipsSEInstrInfo *>(STI.getInstrInfo());
|
*static_cast<const MipsSEInstrInfo *>(STI.getInstrInfo());
|
||||||
const MipsRegisterInfo &RegInfo =
|
const MipsRegisterInfo &RegInfo = *STI.getRegisterInfo();
|
||||||
*static_cast<const MipsRegisterInfo *>(STI.getRegisterInfo());
|
|
||||||
|
|
||||||
DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
||||||
MipsABIInfo ABI = STI.getABI();
|
MipsABIInfo ABI = STI.getABI();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user