HomePhabricator

Teach the inliner how to preserve musttail invariants

Description

Teach the inliner how to preserve musttail invariants

The interesting case is what happens when you inline a musttail call
through a musttail call site. In this case, we can't break perfect
forwarding or allow any stack growth.

Instead of merging control flow from the inlined return instruction
after a musttail call into the body of the caller, leave the inlined
return instruction in the caller so that the musttail call stays in the
tail position.

More work is required in http://reviews.llvm.org/D3630 to handle the
case where the inlined function has dynamic allocas or byval arguments.

Reviewers: chandlerc

Differential Revision: http://reviews.llvm.org/D3491

Details

Committed
rnkMay 15 2014, 1:11 PM
Differential Revision
D3491: Teach the inliner how to preserve musttail invariants
Parents
rL208909: DebugInfo: Add FIXME regarding DILexicalBlock uniquing fields.
Branches
Unknown
Tags
Unknown

Event Timeline