This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Seeking advice on front ends
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Yannick Gingras <ygingras at ygingras dot net>
- Date: Mon, 5 Feb 2007 01:34:08 +0000
- Subject: Re: Seeking advice on front ends
- References: <87wt2xd002.fsf@enceladus.ygingras.net>
> My options code generations are more or less:
>
> 1) Code an interpreter
>
> 2) Build the parse tree in GCC's native format and let GCC generate
> the code
>
> 3) Generate annotated C and call GCC on that.
3b) Generate ISO C. Compile with $(CC).
4) Convert your internal (parse) trees into GENERIC (aka GCC "native") trees
as a separate pass. This is how Java, Ada and Fortran work.
I strongly recommend (4) rather than (2).
Whether you choose (1), (3) or (4) is a decision you need to make based on how
much you care about the quality of generated code, and how much time+effort
you're willing to invest.
Paul