You can use bisection to find out exactly where a speedup came from,
basically the same as finding a regression,

https://emscripten.org/docs/contributing/developers_guide.html#bisecting

That would give you a single (and hopefully short) list of commits in a
single tool (LLVM or Binaryen, but not both).


On Tue, Jan 11, 2022 at 10:26 PM Soeren Balko <[email protected]> wrote:

> So I just installed the emsdk "top of tree" that comes with LLVM 14. Turns
> out that gives me some ~5% performance improvement in some workloads (HEVC
> decoding with FFmpeg, which was already hand-optimised to use WebAssembly
> SIMD intrinsics). Which is great - if only I knew where that's coming
> from...
>
> Specifically, what is not clear to me is the following:
>
> (1) Is the new load hoisting optimization automatically performed as part
> of LLVM/s LICM pass? That's probably more a question to the LLVM peeps and
> I assume that that's a "yes".
> (2) Does the "licm" pass in Binaryen's wasm-opt use LLVM's "licm" pass?
> (3) Does emcc -O3 already include wasm-opt's "licm" pass? I added -s
> BINARYEN_EXTRA_PASSES=licm, but that didn't seem to have an effect.
>
> I tried directly invoking LLVM's LICM optimisation by passing -mllvm -licm
> to emcc, but that makes emcc error out. Interestingly, -mllvm
> -enable-loop-versioning-licm does work, but seems to be an entirely
> different optimization altogether.
>
> Sadly, the interplay of emcc, clang, wasm-opt, and LLVM's opt utility
> isn't all too clear when it comes to non-standard clang/LLVM features...
>
> Soeren
>
> On Wednesday, December 8, 2021 at 3:25:48 AM UTC+10 [email protected]
> wrote:
>
>> Looks like that patch landed Dec 2, so it is already in the latest tip of
>> tree build of emscripten, which people can try with
>>
>> emsdk install tot
>>
>>
>>
>> On Tue, Dec 7, 2021 at 5:52 AM 'Thomas Lively' via emscripten-discuss <
>> [email protected]> wrote:
>>
>>> Yes, from the description in that article I would expect that
>>> optimization to apply to the Wasm target as well.
>>>
>>> Thomas
>>>
>>> On Mon, Dec 6, 2021 at 20:04 Soeren Balko <[email protected]> wrote:
>>>
>>>> Saw this today:  LLVM Clang 14 Lands An "Amazing" Performance
>>>> Optimization - Phoronix
>>>> <https://www.phoronix.com/scan.php?page=news_item&px=LLVM-Clang-14-Hoist-Load>
>>>>
>>>> Looks like a fairly substantial gain for some workloads. Will this also
>>>> apply to the WebAssembly target?
>>>>
>>>>
>>>> --
>>>> 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/243b4dc8-4305-4af5-9e9d-dff8c0e84c4bn%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/emscripten-discuss/243b4dc8-4305-4af5-9e9d-dff8c0e84c4bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> 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/CAJZD_EXyXLJ6-db5tUrgQzmN5QPsV0S0%3DbPub-TZA1BgrjWnjw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAJZD_EXyXLJ6-db5tUrgQzmN5QPsV0S0%3DbPub-TZA1BgrjWnjw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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/f9b4c9a7-92aa-4b3c-b092-8c794693b626n%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/f9b4c9a7-92aa-4b3c-b092-8c794693b626n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAEX4NpQ6yZk3bCDNdjgjaA%2BNV0srD-Ai7cvn7FjPFNPJqVE4Wg%40mail.gmail.com.

Reply via email to