@@ -59,8 +59,7 @@ void LanaiFrameLowering::determineFrameLayout(MachineFunction &MF) const {
5959// ADJDYNALLOC pseudo instructions with a Lanai:ADDI with the
6060// maximum call frame size as the immediate.
6161void LanaiFrameLowering::replaceAdjDynAllocPseudo (MachineFunction &MF) const {
62- const LanaiInstrInfo &LII =
63- *static_cast <const LanaiInstrInfo *>(STI.getInstrInfo ());
62+ const LanaiInstrInfo &LII = *STI.getInstrInfo ();
6463 unsigned MaxCallFrameSize = MF.getFrameInfo ().getMaxCallFrameSize ();
6564
6665 for (MachineBasicBlock &MBB : MF) {
@@ -88,8 +87,7 @@ void LanaiFrameLowering::emitPrologue(MachineFunction &MF,
8887 assert (&MF.front () == &MBB && " Shrink-wrapping not yet supported" );
8988
9089 MachineFrameInfo &MFI = MF.getFrameInfo ();
91- const LanaiInstrInfo &LII =
92- *static_cast <const LanaiInstrInfo *>(STI.getInstrInfo ());
90+ const LanaiInstrInfo &LII = *STI.getInstrInfo ();
9391 MachineBasicBlock::iterator MBBI = MBB.begin ();
9492
9593 // Debug location must be unknown since the first debug location is used
@@ -173,8 +171,7 @@ MachineBasicBlock::iterator LanaiFrameLowering::eliminateCallFramePseudoInstr(
173171void LanaiFrameLowering::emitEpilogue (MachineFunction & /* MF*/ ,
174172 MachineBasicBlock &MBB) const {
175173 MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr ();
176- const LanaiInstrInfo &LII =
177- *static_cast <const LanaiInstrInfo *>(STI.getInstrInfo ());
174+ const LanaiInstrInfo &LII = *STI.getInstrInfo ();
178175 DebugLoc DL = MBBI->getDebugLoc ();
179176
180177 // Restore the stack pointer using the callee's frame pointer value.
@@ -195,8 +192,7 @@ void LanaiFrameLowering::determineCalleeSaves(MachineFunction &MF,
195192 TargetFrameLowering::determineCalleeSaves (MF, SavedRegs, RS);
196193
197194 MachineFrameInfo &MFI = MF.getFrameInfo ();
198- const LanaiRegisterInfo *LRI =
199- static_cast <const LanaiRegisterInfo *>(STI.getRegisterInfo ());
195+ const LanaiRegisterInfo *LRI = STI.getRegisterInfo ();
200196 int Offset = -4 ;
201197
202198 // Reserve 4 bytes for the saved RCA
0 commit comments