GCC Needs a backend cleanup and complete rewrite

Kevin Handy kth@srv.net
Fri Feb 23 08:19:00 GMT 2001


Phil Edwards wrote:
> 
> 
> Maybe my message came across as discouraging.  It wasn't meant to be; I
> would dearly love to see GCC implemented in something else.
> 
> Nor do I have any problem with a tiny bootstrap program written in C; the
> user calls the native C compiler to build that program, which then does
> the rest of the bootstrap.  (I've done vaguely similar things, but nothing
> as large or as important as a compiler.)  It's just that right now our
> "tiny little program" is the entire C back-end.
> 
> One of the design assumptions for my dream compiler is that people wanting to
> build it from scratch are probably going to have to start with a precompiled
> binary of the same compiler (possibly an older version), which was in turn
> made with that wonderful little tool called a cross-compiler.  Assuming no
> more resources than a K&R compiler just seems silly these days; it feels
> like we've been handed three tin cans, a round towitt, and a toilet plunger,
> and asked to build a working sailplane.

If you wrote a backend to the compiler that generated some type of
bytecode (like java, or maybe some custom format), then you would 
only need to bootstrap the bytecode intrepeter to a new machine.
You could then use a precompiled bytecode version which generates
bytecode to bootstrap a native version.



More information about the Gcc mailing list