Skip to content
/ graf Public

A graph-oriented intermediate representation, optimization framework, and machine code generator.

License

Notifications You must be signed in to change notification settings

vezel-dev/graf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e79e1ac · Jan 15, 2025
Dec 20, 2024
Jul 3, 2024
Jun 16, 2024
Jun 16, 2024
Dec 31, 2024
Jun 16, 2024
Jun 16, 2024
Nov 20, 2024
Jun 16, 2024
Jul 1, 2024
Jun 16, 2024
Jun 16, 2024
Sep 20, 2024
Sep 20, 2024
Jun 16, 2024
Jun 17, 2024
Jun 16, 2024
Dec 7, 2024
Dec 7, 2024
Nov 13, 2024
Jan 15, 2025
Jun 16, 2024
Jun 16, 2024
Jun 16, 2024

Repository files navigation

Graf

Graf

A graph-oriented intermediate representation, optimization framework, and machine code generator.

License Commits Build Discussions Discord Zulip


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, 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. 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.

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.