[multiversion] Switch the TTI queries from TargetMachine to Subtarget
[oota-llvm.git] / lib / Target / PowerPC / PPCTargetTransformInfo.cpp
index 3519229eb093c29dfed3e96d0d2749d5ee8a9967..98fe5cdd8db2b6ca901440a73e4b4202e728c8a6 100644 (file)
@@ -183,7 +183,7 @@ unsigned PPCTTIImpl::getIntImmCost(unsigned Opcode, unsigned Idx,
 
 void PPCTTIImpl::getUnrollingPreferences(const Function *F, Loop *L,
                                          TTI::UnrollingPreferences &UP) {
-  if (TM->getSubtarget<PPCSubtarget>(F).getDarwinDirective() == PPC::DIR_A2) {
+  if (ST->getDarwinDirective() == PPC::DIR_A2) {
     // The A2 is in-order with a deep pipeline, and concatenation unrolling
     // helps expose latency-hiding opportunities to the instruction scheduler.
     UP.Partial = UP.Runtime = true;