Crates.io | pliron-derive |
lib.rs | pliron-derive |
version | 0.3.2 |
source | src |
created_at | 2024-05-31 09:29:59.447315 |
updated_at | 2024-07-08 08:38:50.507269 |
description | LLVM Dialect for pliron |
homepage | |
repository | https://github.com/vaivaswatha/pliron |
max_upload_size | |
id | 1257836 |
size | 71,095 |
pliron
is an extensible compiler IR framework, inspired by MLIR
and written in safe Rust.
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_1v1():
builtin.func @foo: builtin.function<() -> (builtin.int<si64>)> {
^entry_block_2v1():
c0_op_3v1_res0 = test.constant builtin.integer <0x0: builtin.int<si64>>;
test.return c0_op_3v1_res0
}
}
pliron
provides an llvm-opt
tool that
can parse LLVM-IR bitcode into the LLVM dialect and output LLVM-IR
bitcode.
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.
pliron
with other compiler projects, touching upon some design decisions.