Files
llvm/test/Reduce/Inputs/remove-bbs.py
T
David Blaikie bfb62257f8 llvm-reduce: Add pass to reduce instructions
Patch by Diego Treviño!

Differential Revision: https://reviews.llvm.org/D66263

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372282 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-19 00:59:27 +00:00

16 lines
312 B
Python
Executable File

import sys
InterestingBBs = 0
input = open(sys.argv[1], "r")
for line in input:
i = line.find(';')
if i >= 0:
line = line[:i]
if line.startswith("interesting") or "%interesting" in line:
InterestingBBs += 1
if InterestingBBs == 6:
sys.exit(0) # interesting!
sys.exit(1) # IR isn't interesting