Code refactoring, no functionality change.
[oota-llvm.git] / lib / Target / X86 / X86FastISel.cpp
index 94dec7ce355dd09c7ee88058db0b477f36108acf..cca98307c52c0e3891d9f6c1287416e80a9db69a 100644 (file)
@@ -31,7 +31,6 @@
 #include "llvm/Support/CallSite.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
-#include "llvm/Target/TargetOptions.h"
 using namespace llvm;
 
 namespace {
@@ -1246,7 +1245,7 @@ bool X86FastISel::X86SelectCall(Instruction *I) {
 
   // fastcc with -tailcallopt is intended to provide a guaranteed
   // tail call optimization. Fastisel doesn't know how to do that.
-  if (CC == CallingConv::Fast && PerformTailCallOpt)
+  if (X86::IsEligibleForTailCallOpt(CC))
     return false;
 
   // Let SDISel handle vararg functions.