Re: CALL_EXPR_MUST_TAIL_CALL and LLVM's musttail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Marc Feeley:

>> On Dec 9, 2021, at 9:04 AM, Florian Weimer <fweimer@xxxxxxxxxx> wrote:
>> 
>> If the life-time of the variables whose address has been taken has ended
>> at the time of the call in a tail position, I expect GCC to turn it into
>> a tail call (subject to the other constraints mentioned).
>
> That’s a very interesting point an I will give it a try.
>
> What worries me however is that you say “I expect GCC to turn it into
> a tail call” and I really need “I guarantee that GCC will turn it into
> a tail call”.

I'm just a GCC user.  And GCC is sufficiently complex and has many
targets that maybe no GCC developer wants to make such a guarantee.

If you don't want to patch glibc, you can perhaps inspect the generated
assembler code.  If the only indirect calls are the tail calls, it might
work.  Kind of like the Evil Mangler, but with less mangling.

Thanks,
Florian





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux