Intermediate Languages

Charlie Farnum <farnum@sequoia.Berkeley.EDU>
Thu, 09 Aug 90 18:01:37 GMT

          From comp.compilers

Related articles
intermediate languages (Ralph Johnson) (1990-08-09)
Intermediate Languages farnum@sequoia.Berkeley.EDU (Charlie Farnum) (1990-08-09)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Charlie Farnum <farnum@sequoia.Berkeley.EDU>
Keywords: code,optimize
Organization: Compilers Central
Date: Thu, 09 Aug 90 18:01:37 GMT

A Scheme-like IL is the way to go. Guy Steele suggested this many moons ago
(like before 1980, in one of the ``Lambda: the ultimate
{imperative,declarative}'' papers), and evidence has been steadily
accumulating since then. A recent reference you might want to look at is
``Compilation by Program Transformation'', Richard Kelsey's 1989 dissertation
from Yale, which presents a Pascal compiler using a Scheme-ish IL.

The Scheme IL community emphasizes continuation-passing style (CPS), which is
convenient (but not necessary) for many of the things you need to do for
Scheme and a royal pain for traditional bread-and-butter optimizations. This
is unfortunate, because the non-CPS style code is perfect for many of the
tree-transformation systems that are popping up, e.g., the pattern-matching
code generators that have been around for several years now. (Which, by the
way, don't deal very well with loop instructions; loops are very hard to
canonicalize, and most IL trees don't include control flow. Of course, if
people would only use Scheme style ILs... :-) )

If you would like a rough ten pages of arguments on why a Scheme-like IL is
wonderful, let me know. If you'ld rather wait for the finished version, look
for ``Prototyping Optimizing Compilers'', coming this December to a Tech
Report list near you.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.