Loading llvm/utils/chunk-print-before-all.py +4 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ # "crashinfo.txt" file leaving only the valid input IR in the last chunk. # Files are written to current working directory. from __future__ import print_function import sys basename = "chunk-" Loading @@ -15,7 +17,7 @@ def print_chunk(lines): global basename fname = basename + str(chunk_id) + ".ll" chunk_id = chunk_id + 1 print "writing chunk " + fname + " (" + str(len(lines)) + " lines)" print("writing chunk " + fname + " (" + str(len(lines)) + " lines)") with open(fname, "w") as f: f.writelines(lines) Loading @@ -35,7 +37,7 @@ for line in sys.stdin: cur.append(line) if is_dump: print "writing crashinfo.txt (" + str(len(cur)) + " lines)" print("writing crashinfo.txt (" + str(len(cur)) + " lines)") with open("crashinfo.txt", "w") as f: f.writelines(cur) else: Loading llvm/utils/llvm-gisel-cov.py +4 −4 Original line number Diff line number Diff line Loading @@ -15,11 +15,11 @@ class FileFormatError(Exception): def backend_int_pair(s): backend, sep, value = s.partition('=') if (sep is None): if sep is None: raise argparse.ArgumentTypeError("'=' missing, expected name=value") if (not backend): if not backend: raise argparse.ArgumentTypeError("Expected name=value") if (not value): if not value: raise argparse.ArgumentTypeError("Expected name=value") return backend, int(value) Loading Loading @@ -60,7 +60,7 @@ def main(): num_rules = dict(args.num_rules) for backend, rules_for_backend in covered_rules.items(): if backend in num_rules: print("%s: %3.2f%% of rules covered" % (backend, float(len(rules_for_backend)) / num_rules[backend]) * 100)) print("%s: %3.2f%% of rules covered" % (backend, float(len(rules_for_backend)) / num_rules[backend]) * 100) else: print("%s: %d rules covered" % (backend, len(rules_for_backend))) Loading Loading
llvm/utils/chunk-print-before-all.py +4 −2 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ # "crashinfo.txt" file leaving only the valid input IR in the last chunk. # Files are written to current working directory. from __future__ import print_function import sys basename = "chunk-" Loading @@ -15,7 +17,7 @@ def print_chunk(lines): global basename fname = basename + str(chunk_id) + ".ll" chunk_id = chunk_id + 1 print "writing chunk " + fname + " (" + str(len(lines)) + " lines)" print("writing chunk " + fname + " (" + str(len(lines)) + " lines)") with open(fname, "w") as f: f.writelines(lines) Loading @@ -35,7 +37,7 @@ for line in sys.stdin: cur.append(line) if is_dump: print "writing crashinfo.txt (" + str(len(cur)) + " lines)" print("writing crashinfo.txt (" + str(len(cur)) + " lines)") with open("crashinfo.txt", "w") as f: f.writelines(cur) else: Loading
llvm/utils/llvm-gisel-cov.py +4 −4 Original line number Diff line number Diff line Loading @@ -15,11 +15,11 @@ class FileFormatError(Exception): def backend_int_pair(s): backend, sep, value = s.partition('=') if (sep is None): if sep is None: raise argparse.ArgumentTypeError("'=' missing, expected name=value") if (not backend): if not backend: raise argparse.ArgumentTypeError("Expected name=value") if (not value): if not value: raise argparse.ArgumentTypeError("Expected name=value") return backend, int(value) Loading Loading @@ -60,7 +60,7 @@ def main(): num_rules = dict(args.num_rules) for backend, rules_for_backend in covered_rules.items(): if backend in num_rules: print("%s: %3.2f%% of rules covered" % (backend, float(len(rules_for_backend)) / num_rules[backend]) * 100)) print("%s: %3.2f%% of rules covered" % (backend, float(len(rules_for_backend)) / num_rules[backend]) * 100) else: print("%s: %d rules covered" % (backend, len(rules_for_backend))) Loading