diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-13 19:18:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-13 19:18:11 +0000 |
commit | 1fdf4a859f03ce5aa4ce9acba29ce321c847388e (patch) | |
tree | 93c52c58a4426086cdc1cc1a3b8b7e9b7c33be97 /lib/Transforms | |
parent | 727d1dd58793447e83ade712f0e58172f156edcf (diff) | |
download | external_llvm-1fdf4a859f03ce5aa4ce9acba29ce321c847388e.zip external_llvm-1fdf4a859f03ce5aa4ce9acba29ce321c847388e.tar.gz external_llvm-1fdf4a859f03ce5aa4ce9acba29ce321c847388e.tar.bz2 |
Use ClonedCodeInfo to avoid another walk over the inlined code, this this
time in common C cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index f7b4ab8..1b08694 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -215,8 +215,10 @@ bool llvm::InlineFunction(CallSite CS) { } } - // If we are inlining tail call instruction through an invoke or - if (MustClearTailCallFlags) { + // If we are inlining tail call instruction through a call site that isn't + // marked 'tail', we must remove the tail marker for any calls in the inlined + // code. + if (MustClearTailCallFlags && InlinedFunctionInfo.ContainsCalls) { for (Function::iterator BB = FirstNewBlock, E = Caller->end(); BB != E; ++BB) for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) |