summaryrefslogtreecommitdiff
path: root/src/wasm2asm.h
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@gmail.com>2018-03-22 13:36:40 -0400
committerAlon Zakai <alonzakai@gmail.com>2018-03-22 10:36:40 -0700
commitf7ebc7c0e53241e4604be5321134d48d640f0a40 (patch)
treec0566b75c42b5a09f2cd89404957b581f5db4878 /src/wasm2asm.h
parent4eeec14d343793af27e77620e1e66eda522a8a6b (diff)
downloadbinaryen-f7ebc7c0e53241e4604be5321134d48d640f0a40.tar.gz
binaryen-f7ebc7c0e53241e4604be5321134d48d640f0a40.tar.bz2
binaryen-f7ebc7c0e53241e4604be5321134d48d640f0a40.zip
reorder locals in wasm2asm (#1482)
The documentation for the simplify-locals pass suggests running reorder-locals after it to clean up unnecessary locals. wasm2asm wasn't doing this, which meant that generated code had a number of unused variables. A good minimizer will probably clean that up, but let's go ahead and clean it up in wasm2asm itself.
Diffstat (limited to 'src/wasm2asm.h')
-rw-r--r--src/wasm2asm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm2asm.h b/src/wasm2asm.h
index 8a17c415d..dce91dacb 100644
--- a/src/wasm2asm.h
+++ b/src/wasm2asm.h
@@ -387,6 +387,7 @@ Ref Wasm2AsmBuilder::processWasm(Module* wasm) {
runner.add("i64-to-i32-lowering");
runner.add("flatten");
runner.add("simplify-locals-notee-nostructure");
+ runner.add("reorder-locals");
runner.add("vacuum");
runner.setDebug(flags.debug);
runner.run();