summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/StackProtector.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-08-20 08:56:23 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-08-20 08:56:23 +0000
commit1977d15e024acc636f97dc2461fcd3fd01ddcd8f (patch)
tree1aeee9ea92d73600d22b32cbe8be7dbd7c3f1c27 /llvm/lib/CodeGen/StackProtector.cpp
parent62c5d714a1360d97ccc05ffb8485a1f4c8be2fee (diff)
downloadbcm5719-llvm-1977d15e024acc636f97dc2461fcd3fd01ddcd8f.tar.gz
bcm5719-llvm-1977d15e024acc636f97dc2461fcd3fd01ddcd8f.zip
[stackprotector] Added significantly longer comment to FindPotentialTailCall to make clear its relationship to llvm::isInTailCallPosition.
llvm-svn: 188770
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
-rw-r--r--llvm/lib/CodeGen/StackProtector.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp
index b45459a4f6d..2cd2219ac92 100644
--- a/llvm/lib/CodeGen/StackProtector.cpp
+++ b/llvm/lib/CodeGen/StackProtector.cpp
@@ -280,7 +280,12 @@ static bool InstructionWillNotHaveChain(const Instruction *I) {
/// Identify if RI has a previous instruction in the "Tail Position" and return
/// it. Otherwise return 0.
///
-/// This is based off of the code in llvm::isInTailCallPosition
+/// This is based off of the code in llvm::isInTailCallPosition. The difference
+/// is that it inverts the first part of llvm::isInTailCallPosition since
+/// isInTailCallPosition is checking if a call is in a tail call position, and
+/// we are searching for an unknown tail call that might be in the tail call
+/// position. Once we find the call though, the code uses the same refactored
+/// code, returnTypeIsEligibleForTailCall.
static CallInst *FindPotentialTailCall(BasicBlock *BB, ReturnInst *RI,
const TargetLoweringBase *TLI) {
// Establish a reasonable upper bound on the maximum amount of instructions we
OpenPOWER on IntegriCloud