4 A script to extract ConstraintElimination's reproducer remarks. The extracted
5 modules are written as textual LLVM IR to files named reproducerXXXX.ll in the
12 if __name__
== "__main__":
13 parser
= argparse
.ArgumentParser(description
=desc
)
17 help="List of optimization record files or directories searched "
18 "for optimization record files.",
21 args
= parser
.parse_args()
23 print_progress
= False
26 files
= optrecord
.find_opt_files(*args
.yaml_dirs_or_files
)
28 parser
.error("No *.opt.yaml files found")
31 all_remarks
, file_remarks
, _
= optrecord
.gather_results(files
, jobs
, True)
35 if r
[1] != "constraint-elimination" or r
[2] != "Reproducer":
37 with
open("reproducer{}.ll".format(i
), "wt") as f
:
38 f
.write(r
[7][1][0][1])