Tamagoyaki

Tamagoyaki is an MLIR-based framework for encoding e-graphs directly in IR, and running equality saturation. It builds on the pdl dialect for rewrite pattern definitions.

At a glance

Tamagoyaki ships two custom MLIR dialects:

  • equivalence — represents e-graphs as IR with equivalence.graph, equivalence.class, and equivalence.yield operations.

  • ematch — extends pdl_interp to perform e-matching for equality saturation.

Two case studies build on it – floating-point accuracy in the spirit of Herbie, and datapath optimisation over CIRCT – and live in their own repository, so that the framework does not carry their dependencies.