arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2106.01768cs.PL
收藏

Homeostasis:自稳定编译器的设计与实现

Homeostasis: Design and Implementation of a Self-Stabilizing Compiler

Aman Nougrahiya, V. Krishna Nandivada

AI总结:

本文提出 Homeostasis 编译器框架,通过自动捕获程序变换并触发程序抽象稳定化,解决变换后抽象失效或不一致的问题,并在 IMOP 中验证其正确性、高效性与易用性。

摘要:

主流编译器会对给定输入程序执行大量分析和优化。每项分析(例如指向分析)都可能生成一种程序抽象(例如指向图)。每项优化通常由多个交替阶段组成:检查此类程序抽象,以及对程序进行变换。程序经过变换后,由各种分析生成的程序抽象可能与修改后的程序变得不一致。因此,在相关程序抽象达到稳定之前,下游检查(以及随后的变换)阶段的正确性无法得到保证;所谓稳定,是指程序抽象要么被失效,要么被调整为与修改后的程序一致。一般而言,现有编译器框架不会自动执行程序抽象的稳定化,而是将这项复杂任务留给编译器遍的编写者处理,包括识别需要稳定化的相关程序抽象、确定执行稳定化的位置,以及确定稳定化的确切过程。在本文中,我们通过提供一个名为 Homeostasis 的新型编译器设计框架的设计与实现来应对这些挑战。Homeostasis 会自动捕获每个变换阶段所执行的所有程序更改,并在之后根据需要利用捕获的信息触发所需的稳定化。我们还给出了 Homeostasis 的形式化描述及其正确性证明。为评估在并行程序编译器中使用 Homeostasis 的可行性,我们已将所提出的思想实现于 IMOP(一个面向 OpenMP C 程序的编译器框架)中。我们给出的评估表明,Homeostasis 既高效又易于使用。

英文摘要:

Mainstream compilers perform a multitude of analyses and optimizations on the given input program. Each analysis (such as points-to analysis) may generate a program-abstraction (such as points-to graph). Each optimization is typically composed of multiple alternating phases of inspection of such program-abstractions and transformations of the program. Upon transformation of a program, the program-abstractions generated by various analyses may become inconsistent with the modified program. Consequently, the correctness of the downstream inspection (and consequent transformation) phases cannot be ensured until the relevant program-abstractions are stabilized; that is, the program-abstractions are either invalidated or made consistent with the modified program. In general, the existing compiler frameworks do not perform automated stabilization of the program-abstractions and instead leave it to the compiler pass writers to deal with the complex task of identifying the relevant program-abstractions to be stabilized, the points where the stabilization is to be performed, and the exact procedure of stabilization. In this paper, we address these challenges by providing the design and implementation of a novel compiler-design framework called Homeostasis. Homeostasis automatically captures all the program changes performed by each transformation phase, and later, triggers the required stabilization using the captured information, if needed. We also provide a formal description of Homeostasis and a correctness proof thereof. To assess the feasibility of using Homeostasis in compilers of parallel programs, we have implemented our proposed idea in IMOP, a compiler framework for OpenMP C programs. We present an evaluation which demonstrates that Homeostasis is efficient and easy to use.

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

↑