Get the function specific subtarget.
authorEric Christopher <echristo@gmail.com>
Fri, 20 Feb 2015 18:44:17 +0000 (18:44 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 20 Feb 2015 18:44:17 +0000 (18:44 +0000)
llvm-svn: 230038

llvm/lib/CodeGen/Analysis.cpp

index 2e8af9e..e50b846 100644 (file)
@@ -518,8 +518,9 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS, const TargetMachine &TM) {
         return false;
     }
 
+  const Function *F = ExitBB->getParent();
   return returnTypeIsEligibleForTailCall(
-      ExitBB->getParent(), I, Ret, *TM.getSubtargetImpl()->getTargetLowering());
+      F, I, Ret, *TM.getSubtargetImpl(*F)->getTargetLowering());
 }
 
 bool llvm::returnTypeIsEligibleForTailCall(const Function *F,