PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
October 16, 20250 citationsOpen Access

eqsat: An Equality Saturation Dialect for Non-destructive Rewriting

View Full Paper
JMJules MerckxALAlexandre LopoukhineSCSamuel Coward

Key Points

  • Equality saturation enables more effective program optimization by utilizing a native representation in the compiler.
  • The eqsat intermediate representation facilitates transformations across various domain-specific IRs while maintaining e-graph integrity.
  • Existing MLIR passes can be orchestrated with equality saturation, improving techniques like common subexpression elimination.
  • The proposed approach mitigates translation overhead by seamlessly integrating e-graphs into the MLIR framework.

Abstract

With recent algorithmic improvements and easy-to-use libraries, equality saturation is being picked up for hardware design, program synthesis, theorem proving, program optimization, and more. Existing work on using equality saturation for program optimization makes use of external equality saturation libraries such as egg, typically generating a single optimized expression. In the context of a compiler, such an approach uses equality saturation to replace a small number of passes. In this work, we propose an alternative approach that represents equality saturation natively in the compiler's intermediate representation, facilitating the application of constructive compiler passes that maintain the e-graph state throughout the compilation flow. We take LLVM's MLIR framework and propose a new MLIR dialect named eqsat that represents e-graphs in MLIR code. This not only provides opportunities to rethink e-matching and extraction techniques by orchestrating existing MLIR passes, such as common subexpression elimination, but also avoids translation overhead between the chosen e-graph library and MLIR. Our eqsat intermediate representation (IR) allows programmers to apply equality saturation on arbitrary domain-specific IRs using the same flow as other compiler transformations in MLIR.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Merckx et al. (2025) studied this question.

synapsesocial.com/papers/68f147cc724575985c3fd0e5https://doi.org/10.48550/arxiv.2505.09363
Ask AI
Helpful
Bookmark
Share
View Full Paper