[PATCH] Allow tail call optimization through multiple/nested struct extractions/insertions

Stephen Lin swlin at post.harvard.edu
Thu Apr 18 06:13:21 PDT 2013


Hi,

This patch generalizes target-independent tail call opportunity
detection to handle cases where a struct is decomposed and recomposed
multiple times, is nested within another struct, or any combination of
both along with any combination of other intermediate no-ops. It also
allows tail calls when structs are partially undefined, as long as all
defined values have the appropriate origins.

Finally, it adds an explicit check for the all-zero getelementptr
case; it seems like the case already works most of the time due to
other reductions, but I'm adding an explicit check to minimize phase
ordering issues and because an in-development patch depends on it.

Please kindly review.
Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tail-call-nested-struct.patch
Type: application/octet-stream
Size: 10958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130418/fbaa1f3a/attachment.obj>


More information about the llvm-commits mailing list