This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Writing a frontend to GCC


On Mon, 5 Nov 2001 at 10:02:27 -0000, Stephano Mariani wrote:
> I am testing an experimental language that I and a few colleagues have
> dsigned. We would rather write frontend to gcc rather than writing our >
own compiler from scratch, and were looking for any information you may > be
able to offer... perhaps someone has documented this. Please bear in > mind
that we have never written a compiler this complex before.

Have a look at

http://cobolforgcc.sourceforge.net/cobol_14.html

Was created January 24, 2001, but I think it is somewhat outdated already
(especially the subsection on memory management). It's a good starting point
though, because it also covers the basics of designing GCC front ends. If
someone knows a better document (i.e. updated) version of this document, I'd
like to have that too...

Grepping in source code of existing front ends is always a good idea. Also
have a look at tree.*.

> 
> I would also like to write some language specific optimizations, is this
> very time consuming (I am not familiar with the internals of GCC)?

I don't know much about language specific optimizations, but I guess  
if you want to do them on RTL, you'll reconsider (or else others will
probably make you reconsider :)  You'd probably have to learn a lot more
about RTL, and understand the ins and outs of the GBE far better than what
you need to just write a front end.

Greetz
Steven Bosscher
s.bosscher@student.tudelft.nl


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]