It seemed clear from the outset that modifying an existing C compiler was the most sensible approach for implementing the qif and qint quasistatic constructs. Whereas many research languages have only one or two compiler implementations to choose from, there are a large number of C compilers which I might choose from. Criteria I was interested in included:
The compilers which were seriously evaluated were: lcc, a ANSI C
compiler by Fraser & Hanson at AT&T Bell Laboratories and Princeton
University []; gcc, the GNU C compiler from the Free
Software Foundation []; and SUIF, the Stanford University
Intermediate Format C compiler []. Candidates which were
not seriously evaluated included vendor compilers and the C-to-C
Translator package.
No vendor compilers were investigated more carefully because it seemed
from the start an unpromising path to pursue; the latter was not
evaluated because it is relatively new; also, strictly speaking,
C-to-C is in a different category in that it is only intended
for use as a source-to-source compiler. Nevertheless, these
candidates are included for comparisons purposes in
Table
.
Table: Comparison of candidate compilers.
Ultimately, I decided to modify the SUIF compiler. See
Appendix for how well SUIF conforms to my
criteria. In practice, SUIF has proven to be a good choice. The
learning curve on using SUIF's kernel library routines to manipulate
the intermediate format was high; however, learning to use them was
certainly less effort than writing abstractions to operate on C
abstract syntax trees myself.