[PATCH] D62877: [WebAssembly] Implement tail calls and unify tablegen call classes
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 14:18:08 PDT 2019
sbc100 added inline comments.
================
Comment at: llvm/docs/CodeGenerator.rst:2107
+On WebAssembly, tail calls are lowered to ``return_call`` and
+``return_call_indirect`` instructions whenever the 'tail-call' target attribute
----------------
tlively wrote:
> dschuff wrote:
> > Shouldn't we have the same restrictions on PIC code?
> > Also, while it seems like va_arg and byval should work, if we're going to promise to optimize those too, we should have some tests.
> I'm not totally clear on the details of our PIC code, but any direct or indirect call could be lowered to a tail call, so I'm not sure why there should be a restriction.
>
> I'll add tests for byval, varargs, etc.
IIRC PIC shouldn't effect direct calls. It effects indirect calls since function addresses aren't statically known.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62877/new/
https://reviews.llvm.org/D62877
More information about the llvm-commits
mailing list