From fd3f6dbe31f07e142ac87f599e7315cfacbe61fe Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 16:08:37 -0700 Subject: do a little more optimization at the end of asm2wasm processing --- src/asm2wasm.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 7cc671597..f88bf9ffc 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -790,7 +790,10 @@ void Asm2WasmBuilder::processAsm(Ref ast) { PassRunner passRunner(&wasm); passRunner.add(this); passRunner.add(); // FinalizeCalls may cause us to require additional drops - if (optimize) passRunner.add("vacuum"); // autodrop can add some garbage + if (optimize) { + passRunner.add("vacuum"); // autodrop can add some garbage + passRunner.add("remove-unused-brs"); // vacuum may open up more opportunities + } passRunner.run(); // apply memory growth, if relevant -- cgit v1.2.3