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.
翻译:等式饱和是一种基于非破坏性重写和一种称为等价类分析的程序分析技术的程序优化方法。当前形式的等价类分析是悲观的,因此在分析循环程序(如SSA形式的程序)时效果不佳。我们提出了一种抽象解释算法,能够在等式饱和过程中精确分析循环。这产生了一种用于乐观分析和非破坏性重写的统一算法。我们基于SSA的新语义,在SSA程序的原型抽象解释器上实例化了该方法。我们的原型能够比clang和gcc更精确地分析简单的示例程序。