Homeostasis: Design and Implementation of a Self-Stabilizing Compiler (TOPLAS)
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 article, 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. Furthermore, to illustrate the benefits of using Homeostasis, we have implemented a set of standard data-flow passes, and a set of involved optimizations that are used to remove redundant barriers in OpenMP C programs. Implementations of none of these optimizations in IMOP required any additional lines of code for stabilization of the program-abstractions. We present an evaluation in the context of these optimizations and analyses, which demonstrates that Homeostasis is efficient and easy to use.
Thu 24 OctDisplayed time zone: Pacific Time (US & Canada) change
10:40 - 12:20 | Compilers and Optimisation 1OOPSLA 2024 at San Gabriel Chair(s): Emery D. Berger University of Massachusetts Amherst | ||
10:40 20mTalk | Compilation of Shape Operators on Sparse Arrays OOPSLA 2024 Alexander J Root Stanford University, Bobby Yan Stanford University, Peiming Liu Google Inc, Christophe Gyurgyik Stanford University, Aart Bik Google, Inc., Fredrik Kjolstad Stanford University DOI Pre-print | ||
11:00 20mTalk | Compiler Support for Sparse Tensor Convolutions OOPSLA 2024 Peiming Liu Google Inc, Alexander J Root Stanford University, Anlun Xu Google, Yinying Li Google, Fredrik Kjolstad Stanford University, Aart Bik Google, Inc. DOI | ||
11:20 20mTalk | Compiling Recurrences over Dense and Sparse Arrays OOPSLA 2024 Shiv Sundram Stanford University, Muhammad Usman Tariq Stanford University, Fredrik Kjolstad Stanford University DOI | ||
11:40 20mTalk | Fully Verified Instruction Scheduling OOPSLA 2024 Ziteng Yang Georgia Institute of Technology, Jun Shirako Georgia Institute of Technology, Vivek Sarkar Georgia Institute of Technology DOI Pre-print | ||
12:00 20mTalk | Homeostasis: Design and Implementation of a Self-Stabilizing Compiler (TOPLAS) OOPSLA 2024 Link to publication |