summaryrefslogtreecommitdiff
path: root/src/wasm2js.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm2js.h')
-rw-r--r--src/wasm2js.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h
index 4e5bebb4c..1a5050af4 100644
--- a/src/wasm2js.h
+++ b/src/wasm2js.h
@@ -295,7 +295,11 @@ Ref Wasm2JSBuilder::processWasm(Module* wasm, Name funcName) {
runner.add("remove-unused-names");
runner.add("merge-blocks");
runner.add("simplify-locals-notee-nostructure");
- runner.add("coalesce-locals");
+ // Coalescing is slow if we didn't run full optimizations earlier, so don't
+ // run it automatically.
+ if (options.optimizeLevel > 0) {
+ runner.add("coalesce-locals");
+ }
runner.add("reorder-locals");
runner.add("vacuum");
runner.add("remove-unused-module-elements");