Newsgroups: comp.lang.scheme,comp.compilers
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!spdcc!iecc!compilers-sender
From: jdean@pysht.cs.washington.edu (Jeffrey Dean)
Subject: Re: Mixing languages
Message-ID: <95-07-023@comp.compilers>
Keywords: GCC
Sender: compilers-sender@chico.iecc.com
Reply-To: jdean@cs.washington.edu
Organization: University of Washington
References: <95-06-013@comp.compilers> <95-06-077@comp.compilers>
Date: Wed, 28 Jun 1995 20:47:33 GMT
Approved: compilers@chico.iecc.com
Lines: 36
Xref: glinda.oz.cs.cmu.edu comp.lang.scheme:12995 comp.compilers:9033

gbaker@rp.CSIRO.AU (Greg Baker) writes:
|> Kurt Stephens (stephens@mcs.com) wrote:
|> : I would like to see GCC packaged as a linkable library (or a server) so we
|> : can call a function (imagine some thing like "void* GCC_compile(RTL
|> : expression)") with a RTL tree and have it return a function pointer!
|>
|> That _would_ be handy!
|>
|> : Has any one designed an embeddable, portable, retargetable "compiler"
|> : library?

Such a system, based on the lcc intermediate representation, was
developed by Dawson Engler and Todd Proebsting.  You basically write
code that constructs lcc IR for the function you want to generate, and
hand it off to the library.  The library then compiles it, and returns
a function pointer to the dynamically generated code.  Because it's
based on lcc's IR, the client code is relatively machine independent.
The paper showed performance results on MIPS and Sparc-based machines.
The system was described in ASPLOS VI (1994):

Dawson Engler and Todd Proebsting, "DCG: An Efficient, Retargetable
Dynamic Code Generation System", Proceedings of ASPLOS-VI,
pp. 263-272, San Jose, CA, 1994.  Published as SIGPLAN Notices,
vol. 29, num. 11.

I'm not sure what the availability of the library is, however.

  -Jeff

------------------------------------------------------------------------------
Jeffrey Dean (jdean@cs.washington.edu)         Graduate Student, Cecil Project
Dept. of Computer Science & Engineering               University of Washington
             http://www.cs.washington.edu/homes/jdean/index.html
-- 
Send compilers articles to compilers@iecc.com,
meta-mail to compilers-request@iecc.com.
