vaivaswatha / pliron

Programming Languages Intermediate Representation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Programming Languages Intermediate RepresentatiON

Status

pliron is an extensible compiler IR framework, inspired by MLIR and written in safe Rust.

Build and Test

  • Install the rust toolchain.

  • cargo build and cargo test should build the compiler and run the testsuite.

  • To see a simple IR constructed (by the print_simple test), use the following command:

    cargo test print_simple -- --show-output
    

    It should print something like:

    builtin.module @bar {
      block_0_0():
        builtin.func @foo: builtin.function <() -> (builtin.integer <si64>)> {
          entry():
            c0_op_2_0_res0 = builtin.constant 0x0: builtin.integer <si64>;
            llvm.return c0_op_2_0_res0
        }
    }

Using the Library

pliron is currently in a nascent stage and not yet useful for real-world use. In the future it can be used by just adding a dependence to the crate in your Rust project.

Documentation

About

Programming Languages Intermediate Representation

License:Apache License 2.0


Languages

Language:Rust 99.5%Language:LLVM 0.4%Language:C 0.1%