Bril-cpp is a collection of tools for Bril IR, including:
build_blocks
: Builds blocks from a Bril program.build_cfg
: Builds a CFG from a Bril program.local_value_numbering
: Performs local value numbering on a Bril program.
This project using nlohmann/json for parsing JSON.
To build bril-cpp
project, follow these steps:
- Make sure you have CMake (version 3.10 or higher) installed on your system.
- Clone the repository and navigate to the project directory.
- Create a build directory and navigate into it:
mkdir build
cd build
- Generate the build system using CMake:
cmake ..
- Build the project by running:
make
- After successful compilation, you can find the executable files
build_blocks
andbuild_cfg
in the build directory.
You can run the following commands combined the bril2json
with build_cfg
or build_blocks
using pipe:
bril2json < ./test/add.bril | ./build/build_cfg