Have MachineFunction cache a pointer to the subtarget to make lookups
[oota-llvm.git] / lib / Target / X86 / X86FloatingPoint.cpp
index dfbfefa39153bbfa97f8c82dab92c0888932f4f7..6883fc0149341410c5c0c3b9a3384126fe832d9e 100644 (file)
@@ -311,7 +311,7 @@ bool FPS::runOnMachineFunction(MachineFunction &MF) {
   if (!FPIsUsed) return false;
 
   Bundles = &getAnalysis<EdgeBundles>();
-  TII = MF.getTarget().getSubtargetImpl()->getInstrInfo();
+  TII = MF.getSubtarget().getInstrInfo();
 
   // Prepare cross-MBB liveness.
   bundleCFG(MF);
@@ -1647,7 +1647,7 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &Inst) {
 
 void FPS::setKillFlags(MachineBasicBlock &MBB) const {
   const TargetRegisterInfo *TRI =
-      MBB.getParent()->getTarget().getSubtargetImpl()->getRegisterInfo();
+      MBB.getParent()->getSubtarget().getRegisterInfo();
   LivePhysRegs LPR(TRI);
 
   LPR.addLiveOuts(&MBB);