Fix PR7272: when inlining through a callsite with byval arguments,

the newly created allocas may be used by inlined calls, so these
need to have their tail call flags cleared.  Fixes PR7272.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2010-05-31 21:00:26 +00:00
parent 89e735673a
commit 2914ba6ec7
2 changed files with 28 additions and 0 deletions

View File

@ -351,6 +351,10 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) {
// Uses of the argument in the function should use our new alloca
// instead.
ActualArg = NewAlloca;
// Calls that we inline may use the new alloca, so we need to clear
// their 'tail' flags.
MustClearTailCallFlags = true;
}
ValueMap[I] = ActualArg;