diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-05-15 20:39:42 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-05-15 20:39:42 +0000 |
commit | 6af21245eb8ed332970f3d30d08efef956a3ce19 (patch) | |
tree | b36f6d23dc2b98572017b40c71f94ec9d846fcdc /llvm/lib/Transforms/Utils | |
parent | 26ab7ead45b37e22dd6f4a7704ca11fb2a47ca43 (diff) | |
download | bcm5719-llvm-6af21245eb8ed332970f3d30d08efef956a3ce19.tar.gz bcm5719-llvm-6af21245eb8ed332970f3d30d08efef956a3ce19.zip |
Remove unused variable in inliner
We have to iterate over all the calls that were inlined to find out if
any were musttail.
Sink another variable down to where its used.
llvm-svn: 208913
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 5b7a5dc88d7..e01d0c38ec4 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -529,13 +529,6 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, CalledFunc->isDeclaration() || // call, or call to a vararg function! CalledFunc->getFunctionType()->isVarArg()) return false; - // If the call to the callee is not a tail call, we must clear the 'tail' - // flags on any calls that we inline. - CallInst::TailCallKind CallSiteTailKind = CallInst::TCK_None; - if (CallInst *CI = dyn_cast<CallInst>(TheCall)) - CallSiteTailKind = CI->getTailCallKind(); - bool MustClearTailCallFlags = false; - // If the call to the callee cannot throw, set the 'nounwind' flag on any // calls that we inline. bool MarkNoUnwind = CS.doesNotThrow(); @@ -693,6 +686,10 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, bool InlinedMustTailCalls = false; if (InlinedFunctionInfo.ContainsCalls) { + CallInst::TailCallKind CallSiteTailKind = CallInst::TCK_None; + if (CallInst *CI = dyn_cast<CallInst>(TheCall)) + CallSiteTailKind = CI->getTailCallKind(); + for (Function::iterator BB = FirstNewBlock, E = Caller->end(); BB != E; ++BB) { for (Instruction &I : *BB) { |