Skip to content

A family of scripts to assist in code reduction workflows

License

Notifications You must be signed in to change notification settings

ClangBuiltLinux/reduce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CBL/reduce

A family of scripts to prepare and execute reduction (cvise, llvm-reduce) workflows.

Currently, there are two scripts:

  1. prep

Prepare a target file for reduction (see Basic Usage)

  1. flags

Minimize the compiler flags required to reproduce behavior. Use after prep

Dependencies

Basic Usage

$ python reduce.py -h

prep

Get help with prep

$ python reduce.py prep -h

Prepare lib/string for reduction by producing a string.i, test.sh and a flags.txt in a temporary directory which are ready-for-consumption by tools like cvise and llvm-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

flags

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.

About

A family of scripts to assist in code reduction workflows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages