summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools/execution-results.h17
-rw-r--r--src/tools/wasm-opt.cpp2
2 files changed, 3 insertions, 16 deletions
diff --git a/src/tools/execution-results.h b/src/tools/execution-results.h
index 10e243287..2491fbf1b 100644
--- a/src/tools/execution-results.h
+++ b/src/tools/execution-results.h
@@ -95,12 +95,6 @@ struct ExecutionResults {
// If set, we should ignore this and not compare it to anything.
bool ignore = false;
- // If set, we don't compare whether a trap has occurred or not.
- bool ignoreTrap = false;
-
- ExecutionResults(const PassOptions& options)
- : ignoreTrap(options.ignoreImplicitTraps || options.trapsNeverHappen) {}
- ExecutionResults(bool ignoreTrap) : ignoreTrap(ignoreTrap) {}
// get results of execution
void get(Module& wasm) {
@@ -140,7 +134,7 @@ struct ExecutionResults {
// get current results and check them against previous ones
void check(Module& wasm) {
- ExecutionResults optimizedResults(ignoreTrap);
+ ExecutionResults optimizedResults;
optimizedResults.get(wasm);
if (optimizedResults != *this) {
std::cout << "[fuzz-exec] optimization passes changed results\n";
@@ -202,14 +196,7 @@ struct ExecutionResults {
}
std::cout << "[fuzz-exec] comparing " << name << '\n';
if (results[name].index() != other.results[name].index()) {
- if (ignoreTrap) {
- if (!std::get_if<Trap>(&results[name]) &&
- !std::get_if<Trap>(&other.results[name])) {
- return false;
- }
- } else {
- return false;
- }
+ return false;
}
auto* values = std::get_if<Literals>(&results[name]);
auto* otherValues = std::get_if<Literals>(&other.results[name]);
diff --git a/src/tools/wasm-opt.cpp b/src/tools/wasm-opt.cpp
index 3927e513c..538496ecf 100644
--- a/src/tools/wasm-opt.cpp
+++ b/src/tools/wasm-opt.cpp
@@ -314,7 +314,7 @@ int main(int argc, const char* argv[]) {
runner.run();
}
- ExecutionResults results(options.passOptions);
+ ExecutionResults results;
if (fuzzExecBefore) {
results.get(wasm);
}