summaryrefslogtreecommitdiff
path: root/test/passes/dce_vacuum_remove-unused-names.wasm
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-10-26 18:43:29 -0700
committerGitHub <noreply@github.com>2020-10-26 18:43:29 -0700
commitf3125579cca998300c230232ed4ded4fe0aaa34c (patch)
treeaeceb7770b47fe8d5eef0f38e26fa540b67db482 /test/passes/dce_vacuum_remove-unused-names.wasm
parent514a6c5eb339b67db852643405428f3add7d0e39 (diff)
downloadbinaryen-f3125579cca998300c230232ed4ded4fe0aaa34c.tar.gz
binaryen-f3125579cca998300c230232ed4ded4fe0aaa34c.tar.bz2
binaryen-f3125579cca998300c230232ed4ded4fe0aaa34c.zip
Rewrite DCE pass (#3274)
The DCE pass is one of the oldest in binaryen, and had quite a lot of cruft from the changes in unreachability and other stuff in wasm and binaryen's history. This PR rewrites it from scratch, making it about 1/3 the size. I noticed this when looking for places to use code autogeneration. The old version had annoying boilerplate, while the new one avoids any need for it. There may be noticeable differences, as the old pass did more than it needed to. It overlapped with remove-unused-names for some reason I don't remember. The new pass leaves that to the other pass to do. I added another run of remove-unused-names to avoid noticeable differences in optimized builds, but you can see differences in the testcases that only run DCE by itself. (The test differences in this PR are mostly whitespace.) (The overlap is that if a block ended up not needed, that is, all branches to it were removed, the old DCE would remove the block.) This pass is about 15% faster than the old version. However, when adding another run of remove-unused-names the difference basically vanishes, so this isn't a speedup.
Diffstat (limited to 'test/passes/dce_vacuum_remove-unused-names.wasm')
-rw-r--r--test/passes/dce_vacuum_remove-unused-names.wasmbin0 -> 260 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/test/passes/dce_vacuum_remove-unused-names.wasm b/test/passes/dce_vacuum_remove-unused-names.wasm
new file mode 100644
index 000000000..5fa1892bd
--- /dev/null
+++ b/test/passes/dce_vacuum_remove-unused-names.wasm
Binary files differ