diff options
author | Alon Zakai <azakai@google.com> | 2022-04-22 14:14:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 14:14:43 -0700 |
commit | be25a9cfb881153ab631e52e36a37e1eed872ff5 (patch) | |
tree | f1fcfe23416d3aa132ff8b70e2372723e4e8751c | |
parent | e16f1e7f250a832742397a1f082c9ea161619ca8 (diff) | |
download | binaryen-be25a9cfb881153ab631e52e36a37e1eed872ff5.tar.gz binaryen-be25a9cfb881153ab631e52e36a37e1eed872ff5.tar.bz2 binaryen-be25a9cfb881153ab631e52e36a37e1eed872ff5.zip |
[NominalFuzzing] Switch to nominal fuzzing by default (#4610)
Add a flag to make it easy to pick which typesystem to test.
-rwxr-xr-x | scripts/fuzz_opt.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 5f6cc4f14..c5627cbde 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -35,8 +35,11 @@ assert sys.version_info.major == 3, 'requires Python 3!' # parameters +TYPE_SYSTEM_FLAG = '--nominal' + # feature options that are always passed to the tools. CONSTANT_FEATURE_OPTS = ['--all-features'] +CONSTANT_FEATURE_OPTS.append(TYPE_SYSTEM_FLAG) INPUT_SIZE_MIN = 1024 INPUT_SIZE_MEAN = 40 * 1024 @@ -1121,6 +1124,7 @@ def write_commands(commands, filename): opt_choices = [ [], ['-O1'], ['-O2'], ['-O3'], ['-O4'], ['-Os'], ['-Oz'], + ["--cfp"], ["--coalesce-locals"], # XXX slow, non-default ["--coalesce-locals-learning"], ["--code-pushing"], @@ -1137,11 +1141,14 @@ opt_choices = [ ["--inlining"], ["--inlining-optimizing"], ["--flatten", "--simplify-locals-notee-nostructure", "--local-cse"], + ["--global-refining"], + ["--gto"], ["--local-cse"], ["--heap2local"], ["--remove-unused-names", "--heap2local"], ["--generate-stack-ir"], ["--licm"], + ["--local-subtyping"], ["--memory-packing"], ["--merge-blocks"], ['--merge-locals'], @@ -1162,13 +1169,15 @@ opt_choices = [ ["--flatten", "--rereloop"], ["--roundtrip"], ["--rse"], - # TODO: fuzz signature-refining/pruning/etc., but those all need --nominal + ["--signature-pruning"], + ["--signature-refining"], ["--simplify-locals"], ["--simplify-locals-nonesting"], ["--simplify-locals-nostructure"], ["--simplify-locals-notee"], ["--simplify-locals-notee-nostructure"], ["--ssa"], + ["--type-refining"], ["--vacuum"], ] @@ -1416,7 +1425,7 @@ You can reduce the testcase by running this now: vvvv -%(wasm_reduce)s %(original_wasm)s '--command=bash %(reduce_sh)s' -t %(temp_wasm)s -w %(working_wasm)s +%(wasm_reduce)s %(type_system_flag)s %(original_wasm)s '--command=bash %(reduce_sh)s' -t %(temp_wasm)s -w %(working_wasm)s ^^^^ @@ -1445,7 +1454,8 @@ After reduction, the reduced file will be in %(working_wasm)s 'temp_wasm': os.path.abspath('t.wasm'), 'working_wasm': os.path.abspath('w.wasm'), 'wasm_reduce': in_bin('wasm-reduce'), - 'reduce_sh': os.path.abspath('reduce.sh')}) + 'reduce_sh': os.path.abspath('reduce.sh'), + 'type_system_flag': TYPE_SYSTEM_FLAG}) break if given_seed is not None: break |