[llvm-dev] Maintaining musttail call contract

Reid Kleckner via llvm-dev
2020-11-03T17:42:23Z

On Mon, Nov 2, 2020 at 8:13 PM Xun Li <lxfind at gmail.com> wrote:

> Is a special "tail call" instruction that is both a call and
return
> practical to add? It would need to inherit from both call and return
> inst, otherwise all the places where it's checking against either of
> them will need to remember to check this special instruction as well,
> which also sounds error-prone to me.
>

My sense is that the current design is better for LLVM as it is today, but
at the end of the day, these are design tradeoffs. I think the current
design makes IPO easier, but makes instrumentation harder. Most scalar
optimization passes don't run into problems because they generally remove
or replace instructions rather than inserting new instructions, and when
they insert new instructions, they tend to be casts, which are permitted.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20201103/1437d049/attachment.html>