We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 159e9a4 commit 3d7c4cfCopy full SHA for 3d7c4cf
1 file changed
scripts/fuzz_opt.py
@@ -511,7 +511,11 @@ def get_multiple_opt_choices():
511
ret = []
512
# core opts
513
while 1:
514
- ret += random.choice(opt_choices)
+ choice = random.choice(opt_choices)
515
+ if '--flatten' in ret and '--flatten' in choice:
516
+ print('avoiding multiple --flatten in a single command, due to exponential overhead')
517
+ else:
518
+ ret += choice
519
if len(ret) > 20 or random.random() < 0.3:
520
break
521
# modifiers (if not already implied by a -O? option)
@@ -520,6 +524,7 @@ def get_multiple_opt_choices():
524
ret += ['--optimize-level=' + str(random.randint(0, 3))]
525
if random.random() < 0.5:
522
526
ret += ['--shrink-level=' + str(random.randint(0, 3))]
527
+ assert ret.count('--flatten') <= 1
523
528
return ret
529
530
0 commit comments