Back to Search
Start Over
Code generation in a machine-independent compiler
- Source :
- SIGPLAN Symposium on Compiler Construction
- Publication Year :
- 2004
- Publisher :
- Association for Computing Machinery (ACM), 2004.
-
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.
- Subjects :
- Source code
Dead code
Programming language
Computer science
media_common.quotation_subject
Loop-invariant code motion
computer.software_genre
Computer Graphics and Computer-Aided Design
Dead code elimination
Addressing mode
Object code
Threaded code
Code generation
KPI-driven code analysis
Compiler
Unreachable code
Redundant code
computer
Software
media_common
Subjects
Details
- ISSN :
- 15581160 and 03621340
- Volume :
- 39
- Database :
- OpenAIRE
- Journal :
- ACM SIGPLAN Notices
- Accession number :
- edsair.doi.dedup.....0d71fe38729ac2a6f6d526c9eb56ccbd
- Full Text :
- https://doi.org/10.1145/989393.989395