diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm2js.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h index 1adde23b8..398b81f43 100644 --- a/src/wasm2js.h +++ b/src/wasm2js.h @@ -329,6 +329,9 @@ Ref Wasm2JSBuilder::processWasm(Module* wasm, Name funcName) { runner.add("reorder-locals"); runner.add("vacuum"); runner.add("remove-unused-module-elements"); + // DCE at the end to make sure all IR nodes have valid types for conversion + // to JS, and not unreachable. + runner.add("dce"); runner.setDebug(flags.debug); runner.run(); } |