| 1 |
\section{Problem Statement} |
| 2 |
|
| 3 |
Writing a native code generator for any language is a significant |
| 4 |
investment, especially for todays modern processors with require extensive |
| 5 |
compiler support to achieve high performance. The algorithms that must |
| 6 |
be used to generate high quality code are complex, sometimes quite |
| 7 |
delicate, and require substantial infrastructure. |
| 8 |
|
| 9 |
\image{Retargeting compiler}{pictures/png/uncol2.png}{align=right} |
| 10 |
A specific architecture has a |
| 11 |
relatively short life time in relation to the time taken to build |
| 12 |
the code generator, and one quickly needs the ability to retarget |
| 13 |
to new versions of the architecture, or to different target |
| 14 |
architectures. This is by no means an open problem. There are many |
| 15 |
compilers today that target multiple architectures, however the |
| 16 |
quality of code varies. For example, |
| 17 |
\begin{color}{red}\begin{Italics}lcc\end{Italics}\end{color} |
| 18 |
by Chris Fraser and David Hansen does |
| 19 |
no back end optimizations; |
| 20 |
\begin{color}{red}\begin{Italics}gcc\end{Italics}\end{color} |
| 21 |
from the Free Software Foundation does extensive peephole and simple |
| 22 |
data flow optimizations, and falls short on advanced superscalar |
| 23 |
optimizations; and finally the |
| 24 |
\begin{color}{red}\begin{Italics}IMPACT\end{Italics}\end{color} |
| 25 |
compiler done by the Impact group at the |
| 26 |
University of Illinois specializes in more advanced superscalar |
| 27 |
and predicated architectures. |
| 28 |
|
| 29 |
\br{clear=right} |
| 30 |
|
| 31 |
\image{UNCOL?}{pictures/png/uncol.png}{align=left} Assuming |
| 32 |
the retargeting issue is solved, one would like to use all the |
| 33 |
developed infrastructure for multiple source languages. This |
| 34 |
problem is far from solved; even though \italics{gcc} has been used |
| 35 |
for multiple languages like Ada, Pascal, and Modula III, each of |
| 36 |
these have similiar execution models or were forced to adopt C |
| 37 |
conventions. \italics{gcc} cannot be used directly for languages |
| 38 |
such as Lisp, Smalltalk, Haskell, or ML that have radically |
| 39 |
different execution models and special requirements to support |
| 40 |
advanced language features. |
| 41 |
|
| 42 |
|