arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.28694cs.PL
收藏

E-Path: 控制流图的等式饱和

E-Path: Equality Saturation for Control-Flow Graphs

Guillermo Garcia

AI总结:

提出E-Path数据结构,通过将指令序列作为等价基本单元,在控制流图上实现等式饱和优化,避免破坏性重写并同时保留多个等价程序变体。

摘要:

现代等式饱和系统擅长表达式级别的重写,通过探索大量等价程序空间而不受阶段排序问题的影响。然而,这些系统难以直接在任意控制流图上表示等价关系,通常需要在优化之前将程序归一化为结构化或树状形式。我们提出了E-Path数据结构,这是一个用于控制流图上等式饱和优化的原型框架。E-Path不表示单个表达式之间的同余,而是记录嵌入在编译器中间表示中的指令序列之间的等价关系。在该原型中,E-Path实例化于编译器后端中基于ANF的受限控制流图,但该模型本身旨在与IR无关。通过将指令序列视为同余的基本单元,E-Path能够对循环和其他控制流结构进行非破坏性优化,同时保留多个等价的程序变体。这使得经典的CFG优化可以表示为重写驱动的变换,而无需对底层图进行破坏性修改。

英文摘要:

Modern equality saturation systems excel at expression-level rewrites by exploring large spaces of equivalent programs without suffering from the phase-ordering problem. How- ever, these systems struggle to represent equivalence directly over arbitrary control-flow graphs, often requiring normal- ization into structured or tree-like forms before optimization can occur. We present the E-Path data structure, a prototype frame- work for equality-saturation-style optimization over control- flow graphs. Instead of representing congruence between individual expressions, the E-Path records equivalence be- tween instruction sequences embedded within a compiler intermediate representation. In this prototype, E-Path is in- stantiated over a restricted ANF-based control-flow graph used in a compiler backend, but the model itself is intended to be IR-agnostic. By treating instruction sequences as the fundamental unit of congruence, the E-Path enables non-destructive optimiza- tion of loops and other control-flow structures while preserv- ing multiple equivalent program variants simultaneously. This allows classical CFG optimizations to be expressed as rewrite-driven transformations without destructive mutation of the underlying graph.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑