patch: emit tail calls with zeroext/signext on return

Stephen Lin swlin at post.harvard.edu
Tue Jul 30 14:38:36 PDT 2013


Tim Northover is doing some work in possibly overhauling the TCO
detection logic to fix some bugs and also allows tail calls in some
cases we don't handle right now. From the looks of it, I think you
patch might actually be disjoint, to be honest, but I'm cc'ing him to
make sure this gets his attention, just in case.
-Stephen

On Mon, Jul 29, 2013 at 11:43 PM, Nick Lewycky <nlewycky at google.com> wrote:
> Currently clang can't emit a tail call on:
>
>   bool g(); bool f() { return g(); }
>
> because we lower the functions to have "zeroext i1" return. This patch
> updates the safety check in codegen which currently forbids zeroext/signext
> from ever participating in tail calls to instead check that the caller and
> callee match.
>
> Please review!
>
> Nick
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list