summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Perron <31666470+s-perron@users.noreply.github.com>2018-08-02 12:04:35 -0400
committerdan sinclair <dj2@everburning.com>2018-08-02 12:04:35 -0400
commite323529d99213aa83db2d5989f99f419b99e7c58 (patch)
treea18b358881315d8a574a46494cb98ab1fdf07623
parent1946fb4ddb73ec39297d73b560d973a56af94c3d (diff)
Register passes in the spirv-opt fuzzer. (#1785)
The spirv-opt fuzzer is not registering any passes to run, so it is not currently testing anything. For now we will just register the performance passes. We should add different fuzzers for the legalization pass (RegisterLegalizationPasses()), and the size passes (RegisterSizePasses()).
-rw-r--r--testing/fuzzers/spvtools_opt_fuzzer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/testing/fuzzers/spvtools_opt_fuzzer.cpp b/testing/fuzzers/spvtools_opt_fuzzer.cpp
index 20ded9a0..7f94febc 100644
--- a/testing/fuzzers/spvtools_opt_fuzzer.cpp
+++ b/testing/fuzzers/spvtools_opt_fuzzer.cpp
@@ -30,6 +30,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
(data[i + 3]) << 24;
}
+ optimizer.RegisterPerformancePasses();
optimizer.Run(input.data(), input.size(), &input);
return 0;