Skip to content

A C++ project contains examples of compiler optimization with Bril IR.

Notifications You must be signed in to change notification settings

chuang0221/bril-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bril-cpp

Introduction

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.

How to Build

To build bril-cpp project, follow these steps:

  1. Make sure you have CMake (version 3.10 or higher) installed on your system.
  2. Clone the repository and navigate to the project directory.
  3. Create a build directory and navigate into it:
mkdir build
cd build
  1. Generate the build system using CMake:
cmake ..
  1. Build the project by running:
make
  1. After successful compilation, you can find the executable files build_blocks and build_cfg in the build directory.

Usage

You can run the following commands combined the bril2json with build_cfg or build_blocks using pipe:

bril2json < ./test/add.bril | ./build/build_cfg

About

A C++ project contains examples of compiler optimization with Bril IR.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published