Have MachineFunction cache a pointer to the subtarget to make lookups
[oota-llvm.git] / lib / Target / PowerPC / PPCBranchSelector.cpp
index 3dd19d03e8b59a0d9691283c2709ac9fbb09037d..41594be42eca90b387adb351e20a06a74c9d94c7 100644 (file)
@@ -64,8 +64,8 @@ FunctionPass *llvm::createPPCBranchSelectionPass() {
 }
 
 bool PPCBSel::runOnMachineFunction(MachineFunction &Fn) {
-  const PPCInstrInfo *TII = static_cast<const PPCInstrInfo *>(
-      Fn.getTarget().getSubtargetImpl()->getInstrInfo());
+  const PPCInstrInfo *TII =
+      static_cast<const PPCInstrInfo *>(Fn.getSubtarget().getInstrInfo());
   // Give the blocks of the function a dense, in-order, numbering.
   Fn.RenumberBlocks();
   BlockSizes.resize(Fn.getNumBlockIDs());