A family of scripts to prepare and execute reduction (cvise, llvm-reduce) workflows.
Currently, there are two scripts:
- prep
Prepare a target file for reduction (see Basic Usage)
- flags
Minimize the compiler flags required to reproduce behavior. Use after prep
$ python reduce.py -h
Get help with prep
$ python reduce.py prep -h
Prepare lib/string for reduction by producing a
string.i
,test.sh
and aflags.txt
in a temporary directory which are ready-for-consumption by tools likecvise
andllvm-reduce
$ python reduce.py prep lib/string -p /path/to/linux -o $(mktemp -d)
Or, try providing a custom build command
$ python reduce.py prep -p $LINUX -o $(mktemp -d) -- make -j8 LLVM=1 V=1 lib/string
Get help with flags
$ python reduce.py flags -h
After running
prep
, reduce flags.txt
$ python reduce.py flags
Note Change your cwd to wherever
flags.txt
is located or try the-p
option.