Back-ends and portable IRs

ICD-C Compiler framework

Thursday, June 17th, 2004

Thanks to Jörg Eckart for a pointer to the ICD-C Compiler framework, which provides, among other things, a C99 parser, a high-level intermediate representation, control and data flow analyses, call graph analyses, and a framework for analyses spanning multiple compilation units.

Java Intermediate Language

Wednesday, June 2nd, 2004

The Java Intermediate Language is an XML-based intermediate representation for Java source code. It appears to have been used most for visualization.

C––, portable assembly language

Thursday, April 1st, 2004

C–– is a “portable assembly language” — a target language for compiler backends that can compile into native code on several platforms. It is implemented in OCaml and appears sufficiently general to handle a wide range of language features: for example, all values are untyped strings of bits, multiple return values are possible, and tail call optimization is readily available. C–– also supports a run-time interface, so that one may use implementations of support code that are most suitable for a given language.

There are code generators for x86, PPC, IA-64, SPARC, MIPS, ARM, and Alpha. According to the web page, as of July 2003, the x86 backend is reasonably mature, whereas the rest are under development.

Thanks to Kent Hunter for the pointer.

MLRISC

Wednesday, March 31st, 2004

MLRISC is a configurable compiler back-end that supports generating code for Alpha, PA-RISC, Sparc, x86, PowerPC, MIPS, and TI C6x processors. The MLRISC intermediate representation, target instruction set, flowgraph, and optimization suite are all parameterizable, so that a front-end can specialize each to produce the most suitable backend for a given language. The system is implemented in ML and is used by several compilers, including:

Thanks to Kent Hunter for the pointer.

Zephyr Compiler Infrastructure

Wednesday, March 31st, 2004

Zephyr Compiler Infrastructure provides a means to define an intermediate representation and write passes on it in several languages; it also provides a hardware description language to power a code-generator generator. From the web site:

If you describe your intermediate forms using Zephyr’s Abstract Syntax Description Language (ASDL), we can generate data-structure definitions in C, C++, Java, Standard ML, and Haskell. Your IR can be serialized on disk and freely exchanged among compiler passes written in these languages…

[Zephyr] generate[s] the machine-dependent parts from descriptions of instructions’ semantics, of binary representations, or of other properties. Zephyr’s Computer Systems Description Languages (CSDL) let you describe as much or as little as you need for your application.

Zephyr also seems to provide a reasonable set of built-in optimizations.