Use the subtarget reference that we already have
[oota-llvm.git] / lib / Target / X86 / X86FrameLowering.cpp
index 394151b0b06f4ef72d60d49c6d9f29a373673838..3c557fe8a1161b669482bc88c5af974a69e7f990 100644 (file)
@@ -2568,8 +2568,7 @@ bool X86FrameLowering::canUseAsEpilogue(const MachineBasicBlock &MBB) const {
   // not taking a chance at messing with them.
   // I.e., unless this block is already an exit block, we can't use
   // it as an epilogue.
-  if (MBB.getParent()->getSubtarget<X86Subtarget>().isTargetWin64() &&
-      !MBB.succ_empty() && !MBB.isReturnBlock())
+  if (STI.isTargetWin64() && !MBB.succ_empty() && !MBB.isReturnBlock())
     return false;
 
   if (canUseLEAForSPInEpilogue(*MBB.getParent()))