]> granicus.if.org Git - llvm/commit
Avoid tail recursion elimination across calls with operand bundles
authorSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 7 Nov 2016 21:01:49 +0000 (21:01 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 7 Nov 2016 21:01:49 +0000 (21:01 +0000)
commitdaf21289b6de229e22a853a0a140682e039d3b8e
tree6e0d6cdd7f139cedd09fdf11bbb5831dff034992
parent2d2f4b65217dc0cf4f1d1d7fca112b83b56721c9
Avoid tail recursion elimination across calls with operand bundles

Summary:
In some specific scenarios with well understood operand bundle types
(like `"deopt"`) it may be possible to go ahead and convert recursion to
iteration, but TailRecursionElimination does not have that logic today
so avoid doing the right thing for now.

I need some input on whether `"funclet"` operand bundles should also
block tail recursion elimination.  If not, I'll allow TRE across calls
with `"funclet"` operand bundles and add a test case.

Reviewers: rnk, majnemer, nlewycky, ahatanak

Subscribers: mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D26270

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286147 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/TailRecursionElimination.cpp
test/Transforms/TailCallElim/deopt-bundle.ll [new file with mode: 0644]