Debian Codegraph @

llvm/test/tools/llvm-reduce/Inputs/remove-bbs.py

raw
1 import sys
2
3 InterestingBBs = 0
4 input = open(sys.argv[1], "r")
5 for line in input:
6 i = line.find(";")
7 if i >= 0:
8 line = line[:i]
9 if line.startswith("interesting") or "%interesting" in line:
10 InterestingBBs += 1
11
12 if InterestingBBs == 6:
13 sys.exit(0) # interesting!
14
15 sys.exit(1) # IR isn't interesting