Have MachineFunction cache a pointer to the subtarget to make lookups
[oota-llvm.git] / lib / Target / AArch64 / AArch64StorePairSuppress.cpp
index b09ecb74a71cc7f4c440daed1f546cbee5bfc2db..61370a5387bbc64e0e1ed41fd6e564d6f64feb8d 100644 (file)
@@ -118,9 +118,9 @@ bool AArch64StorePairSuppress::isNarrowFPStore(const MachineInstr &MI) {
 
 bool AArch64StorePairSuppress::runOnMachineFunction(MachineFunction &mf) {
   MF = &mf;
-  TII = static_cast<const AArch64InstrInfo *>(
-      MF->getTarget().getSubtargetImpl()->getInstrInfo());
-  TRI = MF->getTarget().getSubtargetImpl()->getRegisterInfo();
+  TII =
+      static_cast<const AArch64InstrInfo *>(MF->getSubtarget().getInstrInfo());
+  TRI = MF->getSubtarget().getRegisterInfo();
   MRI = &MF->getRegInfo();
   const TargetSubtargetInfo &ST =
       MF->getTarget().getSubtarget<TargetSubtargetInfo>();