Premium
The design and implementation of a code generation tool
Author(s) -
Akin T. Allen,
Leblanc Richard J.
Publication year - 1982
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380121104
Subject(s) - computer science , compiler , programming language , code generation , dead code elimination , pascal (unit) , generator (circuit theory) , unreachable code , usable , code (set theory) , object code , operating system , power (physics) , physics , set (abstract data type) , quantum mechanics , key (lock) , world wide web
A practical approach to the development of a high‐quality, re‐usable code generator is described in this paper. This code generator produces code for the Prime 64V mode architecture, but the methodology used is generally applicable to the construction of compilers for most architectures. The code generator accepts a tree‐structured intermediate form, linearized and represented as a file of integers. This intermediate form uses high‐level operators, minimizing work by compiler front‐ends that use it and providing a number of advantages in the code generation process. The output of the code generator is assembly language. This tool was found to considerably extend the capabilities of students in a graduate compiler class and has been used in the construction of Pascal and C compilers.