Get the latest tech news

The acyclic e-graph: Cranelift's mid-end optimizer


, I'll be writing about the aegraph, or acyclic egraph, the data structure at the heart of Cranelift's mid-end optimizer. I introduced this approach in 2022 and, after a somewhat circuitous path involving one full rewrite, a number of interesting realizations and "patches" to the initial idea, various discussions with the wider e-graph community (including a talk (slides) at the EGRAPHS workshop at PLDI 2023 and a recent talk and discussions at the e-graphs Dagstuhl seminar), and a whole bunch of contributed rewrite rules over the past three years, it is time that I describe the why (why an e-graph? what benefits does it bring?), the how (how did we escape the pitfalls of full equality saturation? how did we make this efficient enough to productionize in Cranelift?), and the how much (does it help? how can we evaluate it against alternatives?).

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of graph

graph

Photo of acyclic e

acyclic e

Photo of Cranelift

Cranelift

Related news:

News photo

Vulkan 1.4.349 Released With Data Graph Optical Flow Extension

News photo

Graph Topology and Battle Royale Mechanics

News photo

iOS 26.4 Adds Average Bedtime Metric and Restores Blood Oxygen to Health App Vitals Graph