patch: emit tail calls with zeroext/signext on return

Stephen Lin swlin at post.harvard.edu
Tue Jul 30 14:41:55 PDT 2013


Oh, actually, I guess it was already sent to the list for review:

http://permalink.gmane.org/gmane.comp.compilers.llvm.cvs/153124

(Haven't looked at the code myself, yet.)

Anyway, just wanted to make sure you two were both aware.

Stephen

On Tue, Jul 30, 2013 at 2:38 PM, Stephen Lin <swlin at post.harvard.edu> wrote:
> 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