From 2134d9a32b89b5b30121956bbfb070b8c9ee2bd5 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 23 Oct 2023 12:31:10 -0700 Subject: Partially revert #6026 (#6043) That optimization uncovered some LLVM and Binaryen bugs. --- src/passes/RemoveUnusedModuleElements.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/passes/RemoveUnusedModuleElements.cpp b/src/passes/RemoveUnusedModuleElements.cpp index cf1f265bc..ed3c9ed7b 100644 --- a/src/passes/RemoveUnusedModuleElements.cpp +++ b/src/passes/RemoveUnusedModuleElements.cpp @@ -717,6 +717,11 @@ struct RemoveUnusedModuleElements : public Pass { // Do simple work that prepares the module to be efficiently optimized. void prepare(Module* module) { + // FIXME Disable these optimizations for now, as they uncovered bugs in + // both LLVM and Binaryen, + // https://github.com/WebAssembly/binaryen/pull/6026#issuecomment-1775674882 + return; + // If a function export is a function that just calls another function, we // can export that one directly. Doing so might make the function in the // middle unused: -- cgit v1.2.3