https://github.com/hatoo/brilt
Bril to RVSDG
https://github.com/hatoo/brilt
Last synced: 8 months ago
JSON representation
Bril to RVSDG
- Host: GitHub
- URL: https://github.com/hatoo/brilt
- Owner: hatoo
- Created: 2023-09-11T07:32:33.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-20T13:26:59.000Z (over 2 years ago)
- Last Synced: 2025-08-11T14:51:51.002Z (11 months ago)
- Language: Rust
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Brilt
[](https://hatoo.github.io/brilt/brilt/)
Work in progress [Bril](https://github.com/sampsyo/bril) to RVSDG library and optimizer.
# Usage
There are some optimizations defined in `schema.egg`
```
❯ cat bril/examples/test/df/cond.bril | tee /dev/stderr | bril2json | cargo run | bril2txt
@main {
a: int = const 47;
b: int = const 42;
cond: bool = const true;
br cond .left .right;
.left:
b: int = const 1;
c: int = const 5;
jmp .end;
.right:
a: int = const 2;
c: int = const 10;
jmp .end;
.end:
d: int = sub a c;
print d;
}
Compiling brilt v0.1.0 (/home/hatoo/brilt)
Finished dev [unoptimized + debuginfo] target(s) in 3.12s
Running `target/debug/brilt`
@main {
v0: int = const 42;
print v0;
ret;
}
```