This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Converting the gcc backend to a library?
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Subject: Re: Converting the gcc backend to a library?
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 10 Jan 2000 11:41:25 -0200
- Cc: gcc at gcc dot gnu dot org
- References: <10001101327.AA13866@vlsi1.ultra.nyu.edu>
On Jan 10, 2000, kenner@vlsi1.ultra.nyu.edu (Richard Kenner) wrote:
> Think of a Web server running multiple CGI scripts written in Perl,
> Python, Guile, whatever, plus Java servlets. If all of these
> environments could be linked with the same JIT compiler shared
> library, wouldn't it be just great?
> Perhaps, but you're talking about saving perhaps 1.2 MB per process and
> these are likely ones that will have large dataspaces anyway, so the
> actual savings even on such a server will likely turn out negligable
> if you do the calculations.
Even if this is the case. I've been advocating creating a library out
of the back end not for memory or disk-space savings, but to ease the
creation of dynamic compilation environments. I know well that GCC is
not the only piece of software that must be changed to allow this: we
also need a dynamic assembler, that, instead of reading from a file
and generating assembly to a file, would assemble into memory. I hope
this is not too hard to do with some hacking of binutils, by arranging
that some additional parts of as and ld are moved into a library.
Hopefully, in a few months/years, dynamic compilation with the GNU
toolchain (libchain?) would be achievable by simply creating some
trees and asking the back-end to generate native code.
OTOH, I understand that several trade-offs of GCC don't make it
suitable for such a dynamic compilation environment. But I doubt it
would be worth to duplicate all the effort that has already been put
into it. Moreover, adapting GCC to such an environment would
certainly be a lot of fun! :-)
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them