Fix PR7272 in -tailcallelim instead of the inliner
authorReid Kleckner <reid@kleckner.net>
Mon, 21 Apr 2014 20:48:47 +0000 (20:48 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 21 Apr 2014 20:48:47 +0000 (20:48 +0000)
commit0df9abbd63a6cb3767d3ddf3b6c2f8ea8a4f6f7e
tree4aa9b671f14fb7940eded1c5db0ad6c20e7fa92e
parent290ce1944c02ec81787b80dc2a41119de5d7e412
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
lib/Transforms/Scalar/TailRecursionElimination.cpp
lib/Transforms/Utils/InlineFunction.cpp
test/Transforms/Inline/2010-05-31-ByvalTailcall.ll [deleted file]
test/Transforms/Inline/byval-tail-call.ll [new file with mode: 0644]
test/Transforms/TailCallElim/basic.ll