  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.
