|C--||Harvard EECS C-- Home Papers Overview of the language only, from IFL 97|
|C-- Home | Specification & Downloads | Old News | Papers | Mailing List | People | FAQ|
Of late it has become very common for research compilers to emit C as their target code, relying on a C compiler to generate machine code. In effect, C is being used as a portable compiler target language. It offers a simple and effective way of avoiding the need to re-implement effective register allocation, instruction selection, and instruction scheduling, and so on, all for a variety of target architectures. The trouble is that C was designed as a programming language not as a compiler target language, and is not very suitable for the latter purpose. The obvious thing to do is to define a language that is designed as a portable target language. This paper describes C--, a portable compiler target language, or assembler. C-- has to strike a balance between being high-level enough to allow the back end a fair crack of the whip, while being low level enough to give the front end the control it needs. It is not clear that a path exists between these two rocks; th e ghost of UNCOL lurks ominously in the shadows . Yet the increasing popularity of C as a compiler target language (despite its unsuitability) suggests strong demand, and provides an existence proof that something useful can be done.
This paper appears in the Proceedings of the 1997 Workshop on Implementing Funct ional Languages, St Andrews, ed C Clack, Springer Verlag LNCS, 1998.
Download PostScript (82K).