An Approximate Compiler

This is the documentation for ACCEPT, an approximate compiler for C and C++ programs based on Clang. Think of it as your assistant in breaking your program in small ways to trade off correctness for performance.

make setup

Build LLVM and our modified Clang frontend using CMake and Ninja. (This can take a long time.) The programs and libraries are installed into the build/built/ subdirectory.

Build the ACCEPT-specific extensions to LLVM and Clang.

Create a Python virtual environment and install the driver’s dependencies therein.
Take a look inside the Makefile if you’re curious about how to run any of these steps individually.

You should now be able to use the bin/enerclang and bin/enerclang++ programs to compile EnerC programs. You can type make test to make sure everything’s working.

Using

The main entry point to the ACCEPT toolchain is the bin/accept script. For
convenience, you can put this on your $PATH by running source activate.sh. Or you can add something like this to your shell profile (.profile or .bashrc file):