2222
2323parser .add_argument ('--opt-bin' , type = Path , help = 'path to the opt binary' , required = True )
2424parser .add_argument ('--passes' , type = str , help = 'passes to run with opt' , default = 'instcombine' )
25- parser .add_argument ('-j' , '--jobs' , type = int , help = 'number of parallel jobs' , default = os .cpu_count () // 8 )
2625
26+ parser .add_argument ('--no-undef' , action = 'store_true' , help = 'disable undef inputs' )
27+ parser .add_argument ('--no-poison' , action = 'store_true' , help = 'disable poison inputs' )
28+
29+ parser .add_argument ('-j' , '--jobs' , type = int , help = 'number of parallel jobs' , default = os .cpu_count () // 8 )
2730parser .add_argument ('--cont' , action = 'store_true' , help = 'continue TV even if the first miscompilation is found' )
2831
2932# Placeholder removed as args parsing is moved under __main__
@@ -36,8 +39,12 @@ def run_opt(d: Path, timeout: str = '2s', passes: str = 'instcombine', save_resu
3639 return opt_result if save_result else None
3740 return None
3841
39- def run_tv (before : Path , after : Path , timeout : str = '2m' ):
40- tv_args = ['timeout' , timeout , 'alive-tv' , after .absolute ().as_posix (), before .absolute ().as_posix ()]
42+ def run_tv (before : Path , after : Path , timeout : str = '2m' , no_undef : bool = False , no_poison : bool = False ):
43+ tv_args = ['timeout' , timeout , 'alive-tv' , before .absolute ().as_posix (), after .absolute ().as_posix ()]
44+ if no_undef :
45+ tv_args .append ('--disable-undef-input' )
46+ if no_poison :
47+ tv_args .append ('--disable-poison-input' )
4148 tv_p = sp .run (tv_args , capture_output = True , text = True )
4249 if "1 incorrect" in tv_p .stdout :
4350 return "incorrect"
@@ -80,7 +87,7 @@ def process_file(target: Path, crash_dir: Path):
8087
8188
8289def postmortem (covers_dir : Path , crash_dir : Path , jobs : int , cont : bool = False ):
83- files = [d .absolute () for d in covers_dir .iterdir () if d .suffix == '.ll' ]
90+ files = [d .absolute () for d in covers_dir .iterdir () if d .suffix == '.ll' and 'opt.ll' not in d . name ]
8491 files = unique_sorted_files (files )
8592 print (f"Found { len (files )} files to process" , file = sys .stderr )
8693
0 commit comments