Equality Saturation for Optimizing High-Level Julia IR
Jules Merckx, Tim Besard, Bjorn De Sutter

TL;DR
This paper introduces an equality saturation-based system for optimizing high-level Julia code, enabling domain-specific rewrites with control flow, side effects, and type constraints, improving compiler effectiveness.
Contribution
It presents a novel system leveraging e-graphs and equality saturation for domain-specific Julia code optimization, including ILP-based e-graph extraction and CFG relaxation techniques.
Findings
Effective rewrites on high-level Julia code demonstrated
Supports control flow and side effects in optimizations
Analyzes compilation time for practical use
Abstract
Compilers are indispensable for transforming code written in high-level languages into performant machine code, but their general-purpose optimizations sometimes fall short. Domain experts might be aware of certain optimizations that the compiler is unable to apply or that are only valid in a particular domain. We have developed a system that allows domain experts to express rewrite rules to optimize code in the Julia programming language. Our system builds on e-graphs and equality saturation. It can apply optimizations in the presence of control flow and side effects. As Julia uses multiple dispatch, we allow users to constrain rewrite rules by argument types, and propagate type information through the e-graph representation. We propose an ILP formulation for optimal e-graph extraction taking into account dominance properties for code reuse and introduce CFG skeleton relaxation to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsRadiative Heat Transfer Studies · Optical Systems and Laser Technology · Infrared Target Detection Methodologies
