char RISCVExpandAtomicPseudo::ID = 0;
bool RISCVExpandAtomicPseudo::runOnMachineFunction(MachineFunction &MF) {
- TII = static_cast<const RISCVInstrInfo *>(MF.getSubtarget().getInstrInfo());
+ TII = MF.getSubtarget<RISCVSubtarget>().getInstrInfo();
#ifndef NDEBUG
const unsigned OldSize = getInstSizeInBytes(MF);
char RISCVPreRAExpandPseudo::ID = 0;
bool RISCVPreRAExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
- TII = static_cast<const RISCVInstrInfo *>(MF.getSubtarget().getInstrInfo());
+ TII = MF.getSubtarget<RISCVSubtarget>().getInstrInfo();
#ifndef NDEBUG
const unsigned OldSize = getInstSizeInBytes(MF);
if (Fn.getTarget().Options.DisableFramePointerElim(Fn))
return false;
- TII = static_cast<const RISCVInstrInfo *>(Subtarget->getInstrInfo());
+ TII = Subtarget->getInstrInfo();
TRI = Subtarget->getRegisterInfo();
// Resize the modified and used register unit trackers. We do this once
// per function and then clear the register units each time we determine