This is the mail archive of the 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]
Other format: [Raw text]

Re: GCC frontend

On 07/02/2008, Doug84 <> 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.
Gordon House
Barrow Street
Dublin 4

Registered in Dublin, Ireland
Registration Number: 368047

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