[stackprotector] Refactor out the end of isInTailCallPosition into the function retur...
[oota-llvm.git] / include / llvm / CodeGen / Analysis.h
index ce9ca0a0583a3753bb32b2caae3a74e73e4f84d5..b2cc7047b30b7b1e0d245fdd63d491f6837112b3 100644 (file)
@@ -26,6 +26,7 @@ namespace llvm {
 
 class GlobalVariable;
 class TargetLowering;
+class TargetLoweringBase;
 class SDNode;
 class SDValue;
 class SelectionDAG;
@@ -88,6 +89,14 @@ ISD::CondCode getICmpCondCode(ICmpInst::Predicate Pred);
 /// This function only tests target-independent requirements.
 bool isInTailCallPosition(ImmutableCallSite CS, const TargetLowering &TLI);
 
+/// Test if given that the input instruction is in the tail call position if the
+/// return type or any attributes of the function will inhibit tail call
+/// optimization.
+bool returnTypeIsEligibleForTailCall(const Function *F,
+                                     const Instruction *I,
+                                     const ReturnInst *Ret,
+                                     const TargetLoweringBase &TLI);
+
 } // End llvm namespace
 
 #endif