An experiment in table driven code generation

Susan L. Graham, Robert R. Henry, Robert A. Schulman

ACM SIGPLAN Notices · 1982 · 10 citations · 11 references

DOIFull text

Open access

Concepts

Abstract

We have constructed a local code generator for the VAX-11 2 using a parser-like instruction pattern matcher. The code generator replaces the second pass of the UNIX 3 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.

References

11