>
>
>
> 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.
>
> Not really a problem, was just suprising.

>
>
>> - 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).
>
> In my tests, wasm-opt does seem to save around 10% from the executable
size, even if the inputs are wasm object files created by emcc -Oz. Do the
savings come from whole program optimization, or wasm-opt is doing some
per-function optimizations that the llvm backend currently cannot do ?

              Zoltan

> - 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
> <https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpROVLaJLGQj_CEumryq0Xh2kWoAc3UfkNBBE%3Db-F_p_EA%40mail.gmail.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/CAJR-0p-SO8ZVFZbyCzSf89TgUNOPf0-bYH7mz2dxc3XPRxX-%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to