Skip to main content

Optimizing Compiler Design for Modularity and Extensibility

  • Conference paper
  • First Online:
Languages and Compilers for Parallel Computing (LCPC 2001)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2624))

  • 428 Accesses

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Appel, J. Davidson, and N. Ramsey. The Zephyr compiler infrastructure, 1998.

    Google Scholar 

  2. W.E. Cohen. Automatic Construction of Optimizing, Parallelizing Compilers from Specifications. PhD thesis, Purdue University, December 1994.

    Google Scholar 

  3. CSRD. PROMIS Manual ( http://promis.csrd.uiuc.edu/ ). Urbana, Illinois.

  4. C. Fraser, R. Henry, and T. Proebsting. BURG — Fast Optimal Instruction Selection and Tree Parsing, April 1992.

    Google Scholar 

  5. Edison Design Group. http://www.edg.com/.

  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. G. Holloway and M.D. Smith. An Extender’s Guide to the Optimization Programming Interface and Target Descriptions. Harvard University, 2000.

    Google Scholar 

  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. W. Ko. The Promis Universal Machine Descriptor: Concepts, Design, and Implementation. Master’s thesis, University of Illinois, Urbana, Illinois, 2001.

    Google Scholar 

  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. 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. 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. M. Smith. Extending SUIF for Machine-dependent Optimizations. In Proc. First SUIF Compiler Workshop, January 1996.

    Google Scholar 

  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. 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. 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. 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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Carroll, S., Ko, W., Yankelevsky, M., Polychronopoulos, C. (2003). Optimizing Compiler Design for Modularity and Extensibility. In: Dietz, H.G. (eds) Languages and Compilers for Parallel Computing. LCPC 2001. Lecture Notes in Computer Science, vol 2624. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-35767-X_1

Download citation

  • DOI: https://doi.org/10.1007/3-540-35767-X_1

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-04029-3

  • Online ISBN: 978-3-540-35767-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics