On Sat, Jun 8, 2019 at 12:29 AM Zoltan Varga <[email protected]> wrote:

> Hi,
>
> In general the llvm backend seems to work pretty well for us (Mono),
> incremental compilation works fine as well.
>
> Some questions/issues:
> - It looks like some function attributes like noinline are ignored when
> using the wasm backend, presumably because the wasm object files no longer
> contain this
>   information, so the function still gets inlined in the final executable.
>

Yes, it's true that noinline is lost after LLVM IR, so binaryen
optimizations may inline things you didn't expect. Note that this was true
with the asm.js backend before as well, as it also ran the binaryen
optimizer, but whether something is inlined depends on lots of stuff so
maybe it wasn't as noticeable.

If you do the link step with -O0 then it won't run the Binaryen optimizer
at all, and just do a simple link, which avoids this. But that won't help
for a release build where you do want to optimize during link to get the
best code size. Are you just surprised by the inlining, or is this causing
a problem for you? If it's a problem, we can add support for disabling
inlining in binaryen.



> - The final link still takes a lot of time even when all the inputs are
> wasm object files. Most time seems to be spent in wasm-opt from binaryen.
> Does wasm-opt do
> link-time optimization only, or it still does basic optimizations which
> are presumably already done by llvm before emitting the wasm object files ?
>
>
Related to the above, if you link with -O0 then it won't optimize in
Binaryen, and the link step will be just a simple fast link (it also won't
do various JS optimizations, so again it's good for an incremental build
but not for release).

- Alon



>                 thanks
>
>                     Zoltan
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/bc24cc24-412f-460f-88cd-956d06b619a4%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/bc24cc24-412f-460f-88cd-956d06b619a4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpROVLaJLGQj_CEumryq0Xh2kWoAc3UfkNBBE%3Db-F_p_EA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to