aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-08-20 08:36:50 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-08-20 08:36:50 +0000
commit9d6852cf98dd1e6a939b3469ea49ff7cbc15ad73 (patch)
treef0927a095688ef81620b0523e235c41092dbfd78 /include
parent1a6de17273c58129880d8de8094ecc935721b1a1 (diff)
downloadexternal_llvm-9d6852cf98dd1e6a939b3469ea49ff7cbc15ad73.zip
external_llvm-9d6852cf98dd1e6a939b3469ea49ff7cbc15ad73.tar.gz
external_llvm-9d6852cf98dd1e6a939b3469ea49ff7cbc15ad73.tar.bz2
[stackprotector] Refactor out the end of isInTailCallPosition into the function returnTypeIsEligibleForTailCall.
This allows me to use returnTypeIsEligibleForTailCall in the stack protector pass. rdar://13935163 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/Analysis.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/Analysis.h b/include/llvm/CodeGen/Analysis.h
index ce9ca0a..b2cc704 100644
--- a/include/llvm/CodeGen/Analysis.h
+++ b/include/llvm/CodeGen/Analysis.h
@@ -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