Optimism in Equality Saturation

📅 2025-11-25
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Equality saturation suffers from insufficient precision on SSA-form loop programs due to pessimistic e-class analysis, which fails to capture precise loop-dependent equivalences. Method: This paper introduces an *optimistic equality saturation* framework—the first to integrate abstract interpretation into equality saturation—by defining a loop-aware SSA semantics and an optimistic e-class analysis mechanism that jointly supports non-destructive rewriting and precise loop reasoning. Contribution/Results: Implemented in a prototype interpreter, the framework avoids the excessive conservatism of conventional loop approximations. Experimental evaluation demonstrates significantly higher analysis precision on representative loop programs compared to state-of-the-art optimizers in Clang and GCC. The approach establishes a new paradigm for rewrite-based program optimization that simultaneously achieves high expressiveness and semantic precision.

Technology Category

Application Category

📝 Abstract
Equality saturation is a technique for program optimization based on non-destructive rewriting and a form of program analysis called e-class analysis. The current form of e-class analysis is pessimistic and therefore ineffective at analyzing cyclic programs, such as those in SSA form. We propose an abstract interpretation algorithm that can precisely analyze cycles during equality saturation. This results in a unified algorithm for optimistic analysis and non-destructive rewriting. We instantiate this approach on a prototype abstract interpreter for SSA programs using a new semantics of SSA. Our prototype can analyze simple example programs more precisely than clang and gcc.
Problem

Research questions and friction points this paper is trying to address.

Pessimistic e-class analysis fails to handle cyclic programs effectively
Lack of precise cycle analysis during equality saturation optimization
Existing methods struggle with SSA-form program optimization precision
Innovation

Methods, ideas, or system contributions that make the work stand out.

Abstract interpretation algorithm for cycle analysis
Unified optimistic analysis with non-destructive rewriting
New SSA semantics enabling precise program analysis
R
Russel Arbore
University of California, Berkeley, USA
A
Alvin Cheung
University of California, Berkeley, USA
Max Willsey
Max Willsey
UC Berkeley
Programming Languages