Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/tools/wasm-reduce/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FILE(GLOB wasm_reduce_HEADERS *h)
set(wasm_reduce_SOURCES
destructive-reducer.cpp
reducer.cpp
type-reducer.cpp
wasm-reduce.cpp
${wasm_reduce_HEADERS}
)
Expand Down
2 changes: 2 additions & 0 deletions src/tools/wasm-reduce/destructive-reducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ void DestructiveReducer::visitExpression(Expression* curr) {
}
}
}
} else if (curr->is<RefEq>()) {
handleCondition(*getCurrentPointer());
}
// Finally, try to replace with a child.
for (auto* child : ChildIterator(curr)) {
Expand Down
5 changes: 4 additions & 1 deletion src/tools/wasm-reduce/reducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "support/file.h"
#include "support/path.h"
#include "support/timing.h"
#include "tools/wasm-reduce/type-reducer.h"
#include "wasm-io.h"

namespace {
Expand Down Expand Up @@ -268,7 +269,9 @@ size_t Reducer::reduceDestructively(int factor) {
// destroy!
DestructiveReducer destructiveReducer(*this);
destructiveReducer.walkModule(&wasm);
return destructiveReducer.reduced;

TypeReducer typeReducer(*this);
return destructiveReducer.reduced + typeReducer.reduce();
}

bool Reducer::writeAndTestReduction() {
Expand Down
Loading
Loading