[PATCH] D73943: [WebAssembly] Make stack pointer args inhibit tail calls

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 15:45:59 PST 2020


tlively added a comment.

In D73943#1857542 <https://reviews.llvm.org/D73943#1857542>, @dschuff wrote:

> It doesn't look like there's anything wasm-specific here. Surely this also inhibits tail calling in other backends too? Are frontends suppost to avoid putting 'tail call' in the IR in this case?


I took a look at some of the other backends and their logic is much more complicated than what we have here. I didn't see any code that did exactly what I'm doing here, but I assume that they are doing something else to the same effect that is possibly more conservative. It's also possible that they do some magic to move stack arguments before tail calling. Experimentation shows that clang does not add `tail` to the call when a stack argument is passed anyway, so perhaps other frontends do that work themselves as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73943/new/

https://reviews.llvm.org/D73943





More information about the llvm-commits mailing list