summaryrefslogtreecommitdiff
path: root/scripts/fuzz_opt.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/fuzz_opt.py')
-rwxr-xr-xscripts/fuzz_opt.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py
index cd583e026..4fc92f367 100755
--- a/scripts/fuzz_opt.py
+++ b/scripts/fuzz_opt.py
@@ -225,6 +225,11 @@ def randomize_fuzz_settings():
# optimizations we use to create any other wasm file.
FUZZ_OPTS += ['--dce']
+ # Enclose the world much of the time when fuzzing closed-world, so that many
+ # types are private and hence optimizable.
+ if CLOSED_WORLD and random.random() < 0.5:
+ GEN_ARGS += ['--enclose-world']
+
print('randomized settings (NaNs, OOB, legalize):', NANS, OOB, LEGALIZE)
@@ -1790,6 +1795,7 @@ opt_choices = [
("--dce",),
("--directize",),
("--discard-global-effects",),
+ ("--enclose-world",),
("--flatten", "--dfo",),
("--duplicate-function-elimination",),
("--flatten",),