当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Homeostasis: Design and Implementation of a Self-Stabilizing Compiler
arXiv - CS - Programming Languages Pub Date : 2021-06-03 , DOI: arxiv-2106.01768
Aman Nougrahiya, V. Krishna Nandivada

Mainstream compilers perform a multitude of analyses and optimizations on the given input program. Each analysis pass may generate a program-abstraction. Each optimization pass is typically composed of multiple alternating phases of inspection of program-abstractions and transformations of the program. Upon transformation of a program, the program-abstractions generated by various analysis passes may become inconsistent with the program's modified state. Consequently, the downstream transformations may be considered unsafe until the relevant program-abstractions are stabilized, i.e., the program-abstractions are 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 optimization writer to deal with the complex task of identifying the relevant program-abstractions to stabilize, the points where the stabilization is to be performed, and the exact procedure of stabilization. Similarly, adding new analyses becomes a challenge as one has to understand which all existing optimizations may impact the newly added program-abstractions. In this paper, we address these challenges by providing the design and implementation of a novel generalized compiler-design framework called Homeostasis. Homeostasis can be used to guarantee the trigger of automated stabilization of relevant program-abstractions under every possible transformation of the program. Interestingly, Homeostasis provides such guarantees not only for the existing optimization passes but also for any future optimizations that may be added to the framework. We have implemented our proposed ideas in the IMOP compiler framework, for OpenMP C programs. We present an evaluation which shows that Homeostasis is efficient and easy to use.

中文翻译:

稳态:自稳定编译器的设计和实现

主流编译器对给定的输入程序执行大量分析和优化。每个分析通道可以生成一个程序抽象。每个优化通道通常由检查程序抽象和程序转换的多个交替阶段组成。在程序转换时,由各种分析遍生成的程序抽象可能与程序的修改状态不一致。因此,在相关程序抽象稳定之前,下游转换可能被认为是不安全的,即程序抽象与修改后的程序一致。一般来说,现有的编译器框架不执行程序抽象的自动稳定,而是让优化编写者处理识别相关程序抽象以稳定的复杂任务,要执行稳定的点,以及稳定的确切程序。同样,添加新分析成为一项挑战,因为人们必须了解哪些现有优化可能会影响新添加的程序抽象。在本文中,我们通过提供一种名为 Homeostasis 的新型通用编译器设计框架的设计和实现来解决这些挑战。动态平衡可用于保证在程序的每个可能转换下触发相关程序抽象的自动稳定。有趣的是,稳态不仅为现有的优化过程提供了这样的保证,而且还为可能添加到框架中的任何未来优化提供了这样的保证。我们已经在 IMOP 编译器框架中为 OpenMP C 程序实现了我们提出的想法。我们提出了一项评估,表明 Homeostasis 高效且易于使用。
更新日期:2021-06-04
down
wechat
bug