Giter VIP home page Giter VIP logo

minotaur's Introduction

Minotaur: A SIMD-Oriented Synthesizing Superoptimizer

A description of how Minotaur works can be found in https://arxiv.org/abs/2306.00229.

Build Minotaur using Docker

To build the docker container use:

docker build -t minotaur-dev -f Dockerfile .

To run the container use:

docker run -it minotaur-dev bash

Build Minotaur from source code

The project requires cmake, ninja-build, gcc-10, g++-10, redis, redis-server, libhiredis-dev, libbsd-resource-perl, libredis-perl, libgtest-dev, and re2c as dependencies. On Ubuntu/Debian, use

sudo apt-get install cmake ninja-build gcc-10 g++-10 redis redis-server libhiredis-dev libbsd-resource-perl libredis-perl re2c libgtest-dev

or on mac, use

brew install re2c z3 hiredis redis

to install dependencies.

The Alive2 requires a LLVM compiled with RTTI and exceptions enabled, use the following command to fetch and build LLVM.

git clone [email protected]:zhengyang92/llvm $HOME/llvm
mkdir $HOME/llvm/build && cd $HOME/llvm/build
cmake -GNinja -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_EH=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS="llvm;clang" ../llvm
ninja

To fetch and build the Alive2 with semantics for intrinsics, use the following command.

git clone [email protected]:minotaur-toolkit/alive2-intrinsics $HOME/alive2-intrinsics
mkdir $HOME/alive2-intrinsics/build && cd $HOME/alive2-intrinsics/build
cmake -GNinja -DLLVM_DIR=$HOME/llvm/build/lib/cmake/llvm -DBUILD_TV=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
ninja

To build Minotaur, use the following command.

git clone [email protected]:minotaur-toolkit/minotaur $HOME/minotaur
mkdir $HOME/minotaur/build && cd $HOME/minotaur/build
cmake .. -DALIVE2_SOURCE_DIR=$HOME/alive2-intrinsics -DALIVE2_BUILD_DIR=$HOME/alive2-intrinsics/build -DCMAKE_PREFIX_PATH=$HOME/llvm/build -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja
ninja

To run the test suite, use

ninja check

To run the program synthesizer on llvm IR files, use the following command

$HOME/llvm/build/bin/opt -load-pass-plugin $HOME/minotaur/build/minotaur.so -passes="minotaur-online" <LLVM bitcode>

For C/C++ programs, we have a drop-in replacement of C/C++ compiler. Users can call minotaur-cc or minotaur-cxx in the build directory to compile C/C++ programs. Minotaur pass is disabled by default; the pass can be enabled by setting environment variable ENABLE_MINOTAUR.

$HOME/minotaur/build/minotaur-cc <c source> [clang options]

minotaur's People

Contributors

zhengyang92 avatar regehr avatar nadavrot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.