summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-10-23 12:31:10 -0700
committerGitHub <noreply@github.com>2023-10-23 12:31:10 -0700
commit2134d9a32b89b5b30121956bbfb070b8c9ee2bd5 (patch)
tree02644ac9a217b472420d119ab9f937ed845417c1 /src
parent68ff52b278acb95201967709640733a05d6a683a (diff)
downloadbinaryen-2134d9a32b89b5b30121956bbfb070b8c9ee2bd5.tar.gz
binaryen-2134d9a32b89b5b30121956bbfb070b8c9ee2bd5.tar.bz2
binaryen-2134d9a32b89b5b30121956bbfb070b8c9ee2bd5.zip
Partially revert #6026 (#6043)
That optimization uncovered some LLVM and Binaryen bugs.
Diffstat (limited to 'src')
-rw-r--r--src/passes/RemoveUnusedModuleElements.cpp5
1 files changed, 5 insertions, 0 deletions
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: