This is the mail archive of the
mailing list for the GCC project.
Re: GCC frontend
- From: "Rafael Espindola" <espindola at google dot com>
- To: Doug84 <doug1984 at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 7 Feb 2008 17:50:42 +0000
- Subject: Re: GCC frontend
- References: <email@example.com>
On 07/02/2008, Doug84 <firstname.lastname@example.org> wrote:
> Hi folks,
> I've been looking at the documentation for writing a GCC front end and the
> common thing I believe I'm seeing is that the GCC front ends are all run
> through GCC (i.e. you're efficiently adding a new section of coding to the
> GCC program through softcode).
> What I wish to do is create my own front end outside of GCC and then send
> the partly-processed code through the back end (i.e. an intermediate to
> assembly code transformation would be done by GCC - the High language to
> intermediate would be done by my program).
> Now, what would be ideal for me is if I could write the generated output
> into a file (I presume in RTL format, judging from what I've read) and then
> sending it straight into the backend.
> However, my initial research suggests that this is not possible and I will
> have to define a 'dummy language' to write into GCC.
> On the compiler level, I would like the split ideally to be:
> My program:- Lexical analysis, Syntax Analysis, Semantic Analysis,
> Intermediate Code Generation
> GCC backend:- Code optimization, (Final) code generation.
This is not currently available. There is some work on the LTO branch.
Note that a stable file format is not the goal, so you would still
need to link with gcc to write the file or closely track GCC
Depending on what you want, the llvm project might be good.
Rafael Avila de Espindola
Google Ireland Ltd.
Registered in Dublin, Ireland
Registration Number: 368047