[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
article
Free access

Code generation in a machine-independent compiler

Published: 01 August 1979 Publication History

Abstract

This paper presents some code generation issues in the context of the PQCC Production-Quality Compiler-Compiler project [8]. The approach taken is unusual in several ways. The machine-dependent information for selection of code sequences, register assignments, etc., has been separated throughout, in tabular form, from the machine-independent algorithms. This not only greatly simplifies the development of code generators for new machines or languages, but paves the way for automatic generation of these tables from formal machine descriptions such as ISP [1]. A parse-tree-like internal program representation is used, facilitating the use of context and data dependency information about expressions. The code generation process has been broken into several phases. This leads to simplification and better understanding of the code generation process, and also allows important improvements in the quality of generated code. The algorithms for preliminary determination of addressing modes, allocation of registers and other locations, and the code selection case analysis are discussed. The algorithms described in the paper are being implemented and used in the PQCC compiler.

References

[1]
C.G. Bell and A. Newell. Computer Structures: Readings and Examples. McGraw-Hill, 1971.
[2]
R.G.G. Cattell. Formalization and Automatic Derivation of Code Generators. (to appear).
[3]
R.G.G. Cattell. Formalization and Automatic Derivation of Code Generators. PhD thesis, Carnegie-Mellon University, April, 1978.
[4]
R.G.G. Cattell. Using Machine Descriptions for Automatic Generation of Code Generators. In Proceedings of the 3rd Jerusalem Conference on Information Technology, pages 503-507. North-Holland, 1978.
[5]
Digital Equipment Corporation. VAX-11/780 Architecture Handbook. 1977.
[6]
R. Glanville and S. Graham. A New Method for Compiler Code Generation. In Fifth ACM Symposium on Principles of Programming Languages, pages 231-240. SIGPLAN-SIGACT, January, 1978.
[7]
R.K. Johnsson. An Approach to Global Register Allocation. PhD thesis, Carnegie-Mellon University, December, 1975.
[8]
B.W. Leverett, R.G.G. Cattell, S.O. Hobbs, J.M. Newcomer, A.H. Reiner, B.R. Schatz, W.A. Wulf. An Overview of the Production Quality Compiler-Compiler Project. Technical Report CMU-CS-79-105, Carnegie-Mellon University, Computer Science Department, February, 1979.
[9]
Lawrence Livermore Laboratories. S-1 Processor Manual. 1978.
[10]
W. McKeeman. Peephole Optimization. Communications of the ACM 8(7):443-444, July, 1965.
[11]
Knut Ripken. Formale Beschreibung von Maschinen, Implementierungen und optimierender Maschinecode-erzeugung aus attributierten Programmgraphen. PhD thesis, Technische Universitat Munchen, July, 1977. In German; reviewed in English by Bert Speelpenning, A Review of Ripken's Thesis, unpublished.
[12]
W. Wulf, R.K. Johnsson, C.B. Weinstock, S.O. Hobbs, and C.M. Geschke. The Design of an Optimizing Compiler. American-Elsevier, 1975.

Cited By

View all

Index Terms

  1. Code generation in a machine-independent compiler

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 14, Issue 8
    Proceedings of the 1979 SIGPLAN symposium on Compiler construction
    August 1979
    234 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/872732
    Issue’s Table of Contents
    • cover image ACM Conferences
      SIGPLAN '79: Proceedings of the 1979 SIGPLAN symposium on Compiler construction
      August 1979
      241 pages
      ISBN:0897910028
      DOI:10.1145/800229

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 August 1979
    Published in SIGPLAN Volume 14, Issue 8

    Check for updates

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)164
    • Downloads (Last 6 weeks)23
    Reflects downloads up to 31 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)BibliographyEngineering a Compiler10.1016/B978-0-12-815412-0.00023-1(793-813)Online publication date: 2023
    • (2023)Instruction SelectionEngineering a Compiler10.1016/B978-0-12-815412-0.00017-6(575-616)Online publication date: 2023
    • (2023)Overview of CompilationEngineering a Compiler10.1016/B978-0-12-815412-0.00007-3(1-26)Online publication date: 2023
    • (2012)BibliographyEngineering a Compiler10.1016/B978-0-12-088478-0.00024-4(765-785)Online publication date: 2012
    • (2006)Computer‐aided production of language implementation systems: A review and classificationSoftware: Practice and Experience10.1002/spe.438012090212:9(785-824)Online publication date: 27-Oct-2006
    • (2005)Code generation = A* + BURSCompiler Construction10.1007/3-540-61053-7_60(160-176)Online publication date: 7-Jun-2005
    • (2003)Engineering a CompilerundefinedOnline publication date: 11-Dec-2003
    • (1989)Using an architectural knowledge base to generate code for parallel computersProceedings of the 17th conference on ACM Annual Computer Science Conference10.1145/75427.75457(239-244)Online publication date: 21-Feb-1989
    • (1989)Using an architectural knowledge base to generate code for parallel computersCommunications of the ACM10.1145/66451.6645332:9(1065-1072)Online publication date: 1-Sep-1989
    • (1985)A Transportable Programming Language (TPL) System. I. overviewInternational Journal of Computer & Information Sciences10.1007/BF0099100414:3(161-182)Online publication date: Jun-1985
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media