An experiment in table driven code generation
Susan L. Graham, Robert R. Henry, Robert A. Schulman · 1982
We have constructed a local code generator for the VAX-112 using a parser-like instruction pattern matcher. The code generator replaces the second pass of the UNIX3 Portable “Crdquo; compiler. This paper describes the design of the code generator and the special considerations imposed by the pattern matching process. We summarize the structure of the machine description grammar and its associated semantic actions, as well as the tools we developed to manipulate the large VAX description. In our experience, this approach makes the instruction selection phase of the compiler easier and faster to implement, and more likely to be correct than traditional techniques.
Cited by 35 works. doi:10.1145/800230.806978
Authors
References
- The Generation of Optimal Code for Arithmetic Expressions
- UNIX Time-Sharing System: Portability of C Programs and the UNIX System
- A new method for compiler code generation
- A Machine Independent Algorithm for Code Generation and Its Use in Retargetable Compilers
- Automatic Derivation of Code Generators from Machine Descriptions
- Table-Driven Code Generation
- Retargetable code generation and optimization using attribute grammars
- Simplifying code generation through peephole optimization
- Experience with an automatic code generator generator
- Implementation of a portable Fortran 77 compiler using modern tools