An experiment in table driven code generation

  • Authors:
  • Susan L. Graham;Robert R. Henry;Robert A. Schulman

  • Affiliations:
  • Computer Science Division, Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, Berkeley, CA;Computer Science Division, Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, Berkeley, CA;Computer Science Division, Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, Berkeley, CA

  • Venue:
  • SIGPLAN '82 Proceedings of the 1982 SIGPLAN symposium on Compiler construction
  • Year:
  • 1982

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.