https://github.com/vezel-dev/graf
A graph-oriented intermediate representation, optimization framework, and machine code generator.
https://github.com/vezel-dev/graf
c compiler interpreter jit language optimizer runtime toolchain zig
Last synced: 11 months ago
JSON representation
A graph-oriented intermediate representation, optimization framework, and machine code generator.
- Host: GitHub
- URL: https://github.com/vezel-dev/graf
- Owner: vezel-dev
- License: 0bsd
- Created: 2024-05-17T20:16:38.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T16:43:10.000Z (over 1 year ago)
- Last Synced: 2024-10-24T17:26:44.427Z (over 1 year ago)
- Topics: c, compiler, interpreter, jit, language, optimizer, runtime, toolchain, zig
- Language: Zig
- Homepage: https://docs.vezel.dev/graf
- Size: 139 KB
- Stars: 17
- Watchers: 4
- Forks: 1
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE-0BSD
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Graf
A graph-oriented intermediate representation, optimization framework,
and machine code generator.
[](LICENSE-0BSD)
[](https://github.com/vezel-dev/graf/commits/master)
[](https://github.com/vezel-dev/graf/actions/workflows/build.yml)
[](https://github.com/vezel-dev/graf/discussions)
[](https://discord.gg/wtzCfaX2Nj)
[](https://vezel.zulipchat.com)
--------------------------------------------------------------------------------
> [!WARNING]
> This is currently in-development vaporware.
**Graf** is a graph-oriented compiler infrastructure written in Zig. Chiefly, it
provides the Graph Code intermediate representation, a simple optimization
framework, and a machine code generator.
Graph Code is based on the [RVSDG](https://dl.acm.org/doi/abs/10.1145/3391902),
a novel IR that has a number of desirable properties such as explicit data and
state dependencies, inherent static-single assignment form, strong
canonicalization, and whole-program representation.
Optimization is primarily based on
[e-graphs and equality saturation](https://dl.acm.org/doi/10.1145/3434304). In
addition to being a natural fit for the RVSDG, this results in a cohesive
framework for discovering rewrites and losslessly adding them to the IR, thus
avoiding the phase-ordering problem.
For more information, please visit the
[project home page](https://docs.vezel.dev/graf).
## Building
You will need Zig, Pandoc, and Node.js installed. Simply run `zig build` to
build artifacts. Run `zig build --help` for a list of configurable options and
optional build steps.
## License
This project is licensed under the terms found in
[`LICENSE-0BSD`](LICENSE-0BSD).