Skip to content

Releases: WebAssembly/binaryen

version_74

02 Apr 18:40
Compare
Choose a tag to compare
Add Windows binary releases through AppVeyor (#1700)

This commit tweaks the AppVeyor configuration to publish 64 and 32-bit
artifacts as part of the normal release builds. Configuration was also
added to be sure to compile code with `/MT` on MSVC to ensure that the
released artifacts depend on as few DLLs as possible, hopefully making
them as portable as possible.

cc #1695

1.38.30: Discover and run unit tests from check.py (#1948)

21 Mar 14:00
fe0b16a
Compare
Choose a tag to compare
unittest is Python's standard testing framework, so this change allows
arbitrary tests to be written without introducing any new dependencies
or code in check.py. A new test that was not possible to write before
is also included. It is the first of many.

version_73: Do not erase internal debug into in --strip-producers - the pass was …

15 Mar 00:54
d9cdee0
Compare
Choose a tag to compare
…unconditionally erasing it in all --strip passes (#1939)

1.38.29

12 Mar 01:08
d8bcf64
Compare
Choose a tag to compare
Optimize away sets of the same local (#1940)

version_72: Fix getExitingBranches, which had |targets| instead of |curr->targets…

07 Mar 17:51
1a5b410
Compare
Choose a tag to compare
…| (#1936)

That caused it to miss switch targets, and a code-folding bug.

Fixes #1838

Sadly the fuzzer didn't find this because code folding looks for very particular code patterns that are unlikely to be emitted randomly.

version_71: Consistently optimize small added constants into load/store offsets (…

01 Mar 19:10
689fe40
Compare
Choose a tag to compare
…#1924)

See #1919 - we did not do this consistently before.

This adds a lowMemoryUnused option to PassOptions. It can be passed on the commandline with --low-memory-unused. If enabled, we run the new optimize-added-constants pass, which does the real work here, replacing older code in post-emscripten.

Aside from running at the proper time (unlike the old pass, see #1919), this also has a -propagate mode, which can do stuff like this:

y = x + 10
[..]
load(y)
[..]
load(y)
=>
y = x + 10
[..]
load(x, offset=10)
[..]
load(x, offset=10)
That is, it can propagate such offsets to the loads/stores. This pattern is common in big interpreter loops, where the pointers are offsets into a big struct of state.

The pass does this propagation by using a new feature of LocalGraph, which can verify which locals are in SSA mode. Binaryen IR is not SSA (intentionally, since it's a later IR), but if a local only has a single set for all gets, that means that local is in such a state, and can be optimized. The tricky thing is that all locals are initialized to zero, so there are at minimum two sets. But if we verify that the real set dominates all the gets, then the zero initialization cannot reach them, and we are safe.

This PR also makes safe-heap aware of lowMemoryUnused. If so, we check for not just an access of 0, but the range 0-1023.

This makes zlib 5% faster, with either the wasm backend or asm2wasm. It also makes it 0.5% smaller. Also helps sqlite (1.5% faster) and lua (1% faster)

version_70: Optimize normally with debug info (#1927)

28 Feb 19:21
1a483a2
Compare
Choose a tag to compare
* optimize normally with debug info - some of it may be removed, but that's the price of higher optimization levels, and by optimizing normally in profiling and -g2 etc. builds they are more comparable to normal ones, yielding better data
* copy debug locations automatically in replaceCurrent in wasm-traversal, so optimization passes at least by default will preserve debuggability

version_69: Dead return value elimination in DeadArgumentElimination (#1917)

27 Feb 17:34
c6237e8
Compare
Choose a tag to compare
* Finds functions whose return value is always dropped, and removes the return.
* Run multiple iterations of the pass, as one can enable others.
* Do not run DeadArgumentElimination at all if debug info is present (with these improvements, it became much more likely to destroy debug info).

Saves 2.5% on hello world, because of some simple libc calls.

1.38.28: NaN fuzzing improvements (#1913)

22 Feb 14:30
3564b71
Compare
Choose a tag to compare
* make DE_NAN avoid creating nan literals in the first place
* add a reducer option `--denan` to not introduce nans in destructive reduction
* add a `Literal::isNaN()` method
* also remove the default exception logging from the fuzzer js glue, which is a source of non-useful VM differences (like nan nondeterminism)
* added an option `--no-fuzz-nans` to make it easy to avoid nans when fuzzing (without hacking the source and recompiling).

Background: trying to get fuzzing on jsc working despite this open issue: https://bugs.webkit.org/show_bug.cgi?id=175691

version_68

14 Feb 19:26
90d0ee4
Compare
Choose a tag to compare
respect --no-validation in pass-debug mode (#1904)