aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/Analysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-03-19 17:03:16 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-03-19 17:03:16 +0000
commitb1f3b4989f315014a8191fb5788e84e5e832e982 (patch)
tree8daa80495d93ee2533d15f63d3c372676518e9d6 /llvm/lib/CodeGen/Analysis.cpp
parente7a101ccab87c7f0a9335f1ab0f28c73ae21a21d (diff)
downloadllvm-b1f3b4989f315014a8191fb5788e84e5e832e982.zip
llvm-b1f3b4989f315014a8191fb5788e84e5e832e982.tar.gz
llvm-b1f3b4989f315014a8191fb5788e84e5e832e982.tar.bz2
Minor code re-structuring.
llvm-svn: 127952
Diffstat (limited to 'llvm/lib/CodeGen/Analysis.cpp')
-rw-r--r--llvm/lib/CodeGen/Analysis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/Analysis.cpp b/llvm/lib/CodeGen/Analysis.cpp
index 36638c3..125e641 100644
--- a/llvm/lib/CodeGen/Analysis.cpp
+++ b/llvm/lib/CodeGen/Analysis.cpp
@@ -211,7 +211,6 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS, Attributes CalleeRetAttr,
const BasicBlock *ExitBB = I->getParent();
const TerminatorInst *Term = ExitBB->getTerminator();
const ReturnInst *Ret = dyn_cast<ReturnInst>(Term);
- const Function *F = ExitBB->getParent();
// The block must end in a return statement or unreachable.
//
@@ -250,6 +249,7 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS, Attributes CalleeRetAttr,
// Conservatively require the attributes of the call to match those of
// the return. Ignore noalias because it doesn't affect the call sequence.
+ const Function *F = ExitBB->getParent();
unsigned CallerRetAttr = F->getAttributes().getRetAttributes();
if ((CalleeRetAttr ^ CallerRetAttr) & ~Attribute::NoAlias)
return false;