mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Fix PR7272 in -tailcallelim instead of the inliner
The -tailcallelim pass should be checking if byval or inalloca args can be captured before marking calls as tail calls. This was the real root cause of PR7272. With a better fix in place, revert the inliner change from r105255. The test case it introduced still passes and has been moved to test/Transforms/Inline/byval-tail-call.ll. Reviewers: chandlerc Differential Revision: http://reviews.llvm.org/D3403 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206789 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -586,15 +586,8 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI,
|
||||
if (CS.isByValArgument(ArgNo)) {
|
||||
ActualArg = HandleByValArgument(ActualArg, TheCall, CalledFunc, IFI,
|
||||
CalledFunc->getParamAlignment(ArgNo+1));
|
||||
|
||||
// Calls that we inline may use the new alloca, so we need to clear
|
||||
// their 'tail' flags if HandleByValArgument introduced a new alloca and
|
||||
// the callee has calls.
|
||||
if (ActualArg != *AI) {
|
||||
MustClearTailCallFlags = true;
|
||||
if (ActualArg != *AI)
|
||||
ByValInit.push_back(std::make_pair(ActualArg, (Value*) *AI));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
VMap[I] = ActualArg;
|
||||
|
||||
Reference in New Issue
Block a user