通过控制流图的语法分解提升编译器优化效率
Enhancing Compiler Optimization Efficiency through Grammatical Decompositions of Control-Flow Graphs
AI总结:
针对树分解忽视控制流图稀疏性且计算成本高的问题,提出 SPL 分解框架及图上 PCSP 通用解法,用于寄存器分配、LOSPRE 和存储区选择指令放置,并经实验证明显著优于现有方法。
摘要:
本论文探讨编译器优化中的复杂问题,例如寄存器分配和生命周期最优投机部分冗余消除(Lifetime-optimal Speculative Partial Redundancy Elimination,LOSPRE),这些问题通常采用树分解算法处理。然而,这些方法经常忽视控制流图(Control Flow Graphs,CFGs)的重要稀疏性方面,并导致较高的计算成本。我们提出 SPL(Series-Parallel-Loop,串-并-环)分解,这是一个可为上述挑战提供最优解的新颖框架。一项关键贡献是在图结构内形式化了部分约束满足问题(Partial Constraint Satisfaction Problems,PCSPs)的通用解法,并将其应用于三个优化问题。首先,SPL 分解通过精确建模变量干涉图来增强寄存器分配,从而在各基准测试中实现高效的寄存器指派并提升性能。其次,它通过有效识别并消除程序执行中的冗余来优化 LOSPRE。最后,论文聚焦于优化存储区选择指令的放置,以提升数据检索效率并降低延迟。大量实验表明,相较现有方法,其性能获得显著提升,从而确立 SPL 分解作为处理寄存器分配、LOSPRE 和存储区选择等复杂编译器优化的强大工具。
英文摘要:
This thesis addresses the complexities of compiler optimizations, such as register allocation and Lifetime-optimal Speculative Partial Redundancy Elimination (LOSPRE), which are often handled using tree decomposition algorithms. However, these methods frequently overlook important sparsity aspects of Control Flow Graphs (CFGs) and result in high computational costs. We introduce the SPL (Series-Parallel-Loop) decomposition, a novel framework that offers optimal solutions to these challenges. A key contribution is the formulation of a general solution for Partial Constraint Satisfaction Problems (PCSPs) within graph structures, applied to three optimization problems. First, SPL decomposition enhances register allocation by accurately modeling variable interference graphs, leading to efficient register assignments and improved performance across benchmarks. Second, it optimizes LOSPRE by effectively identifying and eliminating redundancies in program execution. Finally, the thesis focuses on optimizing the placement of bank selection instructions to enhance data retrieval efficiency and reduce latency. Extensive experimentation demonstrates significant performance improvements over existing methods, establishing SPL decomposition as a powerful tool for complex compiler optimizations, including register allocation, LOSPRE, and bank selection.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。