The Quick C-- Compiler
C-- is intended as a ``portable assembly language'' that can
replace C as a target language used by compiler writers.
The goal of the Quick C-- project
is to test those ideas in an implementation.
Quick C-- is a relatively small compiler with a few simple optimizations.
Our primary goal is to to validate our
design experimentally. A secondary, but still
significant goal is to provide a vehicle for
experimenting with new techniques for building retargetable
The compiler is
- Easy to specialize, say for a new
- Relatively easy to retarget to the platform of
choice, although this aspect still needs work.
The Quick C-- compiler
- Generates native code for the Intel 32-bit x86 architecture
(several other back ends, including OS X PowerPC, are in
varying stages of incompletion)
- Is written in Objective
- Uses the RTL-based code-generation techniques developed by Jack
Davidson and Chris Fraser
- Uses a graph-coloring, coalescing, Appel-George register
allocator (implemented by John Dias)
- Supports a few simple optimizations such as peephole optimization and dead-code elimination
- Is structured so we can add more optimizations later
- Compiles useful programs, including the the Quick C-- interpreter
- Comes with Paul Govereau's demonstration front end
(available from our rsync server)
for the Tiger language
- Supports position-independent code after a fashion, which will improve over time
- Does not implement the full C-- specification, so you would do well to
consult the release notes
- Is not quick enough :-(
Features that we don't currently support but hope to add later include
- Package QC-- as a dynamic compiler or
library, not just a batch compiler.
- Support code generation straight into
memory, and possibly into ELF object files, as well
as emitting assembly language.
Compiler Source Code
The source code of QC-- is available as a snapshot from our CVS
You can get it from our rsync server, which has
many capabilities, including
get a recent tarball, browse
the source code, or read the CVS change log.
Quick C-- has been supported gifts from Microsoft Research and from
Intel Research as well as grants from the National Science Foundation.
The results of our research on Quick C-- may be used freely by anyone
for any purpose.
Contact: C-- Webmaster.
Last edited: Sat 11 Oct 2008 16:57 EDT.