In compiler design there is often a trade-off between compilation time and target code quality. This trade-off is even more delicate in an incremental compiler, where low response time is crucial. Rather than present a single rigid incremental compiler, this paper explores the design of a flexible framework for building incremental compilers. The system described is adaptable to different workloads, source languages, and target architectures. This adaptability is derived from the use of a blackboard architecture for composing incremental components, combined with a common intermediate representation which is designed with incrementality in mind. Incremental techniques for constructing this representation and generating target code are described. The blackboard architecture allows significant freedom in the number and types of optimizations that may be applied to programs. A novel approach to incremental register allocation is presented which maintains this design philosophy.
展开▼