Alon Zakai
Alon Zakai
I am unsure if it makes sense to land this here in upstream. If this were a common use case I'd feel differently, but I haven't heard of this situation...
> In other words, I see the following flow, which separates compilation and optimisation. > 1. Use binaryen to compile something into wasm. > 2. Use wasm-opt / other tools...
> The benefit is that you are able to compile many things into wasm modules (possibly in parallel), then link them together via something like wasm-ld, and finally optimize the...
These are valid use cases, and Binaryen may be relevant there. What I am not sure of is the benefit of saving some binary size in one part of that...
One case we should test on is `binaryen3.test_sqlite` in emscripten: the `merge-locals` pass is extremely slow there (dozens of seconds).
I experimented with using a flow analysis, similar to coalesce-locals, in https://github.com/WebAssembly/binaryen/commits/fast-local-graph (see last 3 commits there) but it makes it slower :-o The issue there is probably that we...
> No JS engine present to run this test with. Hmm, looks like node and sm bugs limit what vms we run the test on. And testing, it seems like...
Oh, and thanks for mentioning `tracetree`! First I heard of it, looks very useful.
@tlively hmm, it does help, but it still isn't fast enough to enable the passes mentioned in the first sentence, at more opt levels. Ideally we would find a way...
Other passes (vacuum) would get rid of the dropped get, so running this after them would be best I think.