Have MachineFunction cache a pointer to the subtarget to make lookups
[oota-llvm.git] / lib / CodeGen / DeadMachineInstructionElim.cpp
index 09b5e931b6ff13b0449fd59941fdb82de926aaf0..535477de78896c82e64387a9f596251c1a1dbb31 100644 (file)
@@ -92,8 +92,8 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
 
   bool AnyChanges = false;
   MRI = &MF.getRegInfo();
-  TRI = MF.getTarget().getSubtargetImpl()->getRegisterInfo();
-  TII = MF.getTarget().getSubtargetImpl()->getInstrInfo();
+  TRI = MF.getSubtarget().getRegisterInfo();
+  TII = MF.getSubtarget().getInstrInfo();
 
   // Loop over all instructions in all blocks, from bottom to top, so that it's
   // more likely that chains of dependent but ultimately dead instructions will