Optimizing Compiler Design for Modularity and Extensibility

  • Steven Carroll
  • Walden Ko
  • Mark Yankelevsky
  • Constantine Polychronopoulos
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2624)


Implementing an optimizing compiler for a new target architecture has traditionally been a complex design/development effort requiring a large time scale. Existing machine descriptions and approaches based on pre-existing internal representations (IR) are not sufficient to build truly modular and extensible compilers. This paper describes the features of the Extensible Compiler Interface (ECI) implemented in the PROMIS compiler, which tackles several major problems concerning the reuse of compiler components, retargeting as well as extending existing compilers with new functionality. One of the main design issues is maintaining analysis information calculated by one module after another potentially unknown module modifies the IR. Another problem is expanding existing modules (or passes) to work with processor-specific instructions and data types added by the compiler developers. Our approach to compiler extensibility through the proposed ECI tackles and solves the above problems, and provides a simple yet powerful API for adding arbitrary functionality or entirely new optimizations to existing compilers. A case study is presented in which the components of a parallelizing compiler are reused to build a compiler for a vector architecture, thereby demonstrating the utility and convenience of ECI.


Strip Mining Strongly Connect Component Analysis Pass Abstract Syntax Tree Intrinsic Function 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    A. Appel, J. Davidson, and N. Ramsey. The Zephyr compiler infrastructure, 1998.Google Scholar
  2. [2]
    W.E. Cohen. Automatic Construction of Optimizing, Parallelizing Compilers from Specifications. PhD thesis, Purdue University, December 1994.Google Scholar
  3. [3]
    CSRD. PROMIS Manual ( Urbana, Illinois.
  4. [4]
    C. Fraser, R. Henry, and T. Proebsting. BURG — Fast Optimal Instruction Selection and Tree Parsing, April 1992.Google Scholar
  5. [5]
    Edison Design Group.
  6. [6]
    L.J. Hendren, C. Donawa, M. Emami, G. R. Gao, Justiani, and B. Sridharan. Designing the McCAT Compiler Based on a Family of Structured Intermediate Representations. In Proceedings of the 5th International Workshop on Languages and Compilers for Parallel Computing, pages 406–420. Springer-Verlag, LNCS 757, 1993.Google Scholar
  7. [7]
    G. Holloway and M.D. Smith. An Extender’s Guide to the Optimization Programming Interface and Target Descriptions. Harvard University, 2000.Google Scholar
  8. [8]
    S. C. Johnson. Yacc: Yet another compiler compiler. In UNIX Programmer’s Manual, volume 2, pages 353–387. Holt, Rinehart, and Winston, New York, NY, USA, 1979.Google Scholar
  9. [9]
    W. Ko. The Promis Universal Machine Descriptor: Concepts, Design, and Implementation. Master’s thesis, University of Illinois, Urbana, Illinois, 2001.Google Scholar
  10. [10]
    M. E. Lesk. Lex — A lexical analyzer generator. Technical Report No. 39, AT&T Bell Laboratories, Murray Hill, N.J., 1975.Google Scholar
  11. [11]
    H. Saito, N. Stavrakos, Steve Carroll, Constantine Polychronopoulos, and Alex Nicolau. The design of the PROMIS compiler. In Proceedings of the International Conference on Compiler Construction (CC), March 1999. Also available in Lecture Notes in Computer Science No. 1575 (Springer-Verlag) and as CSRD Technical Report No. 1539 (rev.1).Google Scholar
  12. [12]
    H. Saito, N. Stavrakos, C. Polychronopoulos, and A. Nicolau. The Design of the PROMIS Compiler — Towards Multi-Level Parallelization. International Journal of Parallel Programming, 28(2), 2000.Google Scholar
  13. [13]
    M. Smith. Extending SUIF for Machine-dependent Optimizations. In Proc. First SUIF Compiler Workshop, January 1996.Google Scholar
  14. [14]
    M.D. Smith and G. Holloway. An Introduction to Machine SUIF and Its Portable Libraries for Analysis and Optimization. Harvard University, 2000.Google Scholar
  15. [15]
    N. Stavrakos, S. Carroll, H. Saito, C. Polychronopoulos, and A. Nicolau. Symbolic analysis in the PROMIS compiler. In Proceedings of the International Workshop on Languages and Compilers for Parallel Computing (LCPC), August 1999. Also available in Lecture Notes in Computer Science (Springer-Verlag). Extended version available as CSRD Technical Report No. 1564.Google Scholar
  16. [16]
    D. Whitfield and M.L. Soffa. An approach to ordering optimizing transformations. In Proceedings of ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming (PPoPP), March 1990.Google Scholar
  17. [17]
    R. Wilson, R. French, C. Wilson, S. Amarasinghe, J. Anderson, S. Tjiang, S. Liao, C. Tseng, M. Hall, M. Lam, and J. Hennessy. The SUIF compiler system: a parallelizing and optimizing research compiler. Technical Report CSL-TR-94-620, Stanford University, May 1994.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Steven Carroll
    • 1
  • Walden Ko
    • 1
  • Mark Yankelevsky
    • 1
  • Constantine Polychronopoulos
    • 1
  1. 1.Center for Supercomputing Research and DevelopmentUniversity of Illinois at Urbana-ChampaignUrbanaUSA

Personalised recommendations