Title :
Towards universal code generator generation
Author :
Richards, Timothy ; Walters, Edward K., II ; Moss, J. Eliot B ; Palmer, Trek ; Weems, Charles C.
Author_Institution :
Dept. of Comput. Sci., Univ. of Massachusetts, Amherst, MA
Abstract :
One of the most difficult tasks a compiler writer faces is the construction of the code generator. The code generator is that part of the compiler that translates compiler intermediate representation (IR) into instructions for a target machine. Unfortunately, implementing a code generator "by hand" is a difficult, time consuming, and error prone task. The details of both the IR and target instruction set must be carefully considered in order to generate correct and efficient code. This, in turn, requires an expert in both the compiler internals as well as the target machine. Even an expert, however, can produce a code generator that is difficult to verify and debug. In this paper we present a universal approach for automating the construction of correct code generators. In particular, we show that both the compiler IR and target instruction set semantics can be described by a machine description language and leveraged by a heuristic search procedure to derive code generator patterns. We then utilize formal methods to determine if the IR and target sequence pairs that make up these patterns are semantically equivalent.
Keywords :
program compilers; programming language semantics; specification languages; code generator patterns; compiler intermediate representation; heuristic search; machine description language; target instruction set semantics; universal code generator; Bridges; Computer languages; Computer science; Filters; Test pattern generators; Testing;
Conference_Titel :
Parallel and Distributed Processing, 2008. IPDPS 2008. IEEE International Symposium on
Conference_Location :
Miami, FL
Print_ISBN :
978-1-4244-1693-6
Electronic_ISBN :
1530-2075
DOI :
10.1109/IPDPS.2008.4536404