This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Great example of why "everything is a tree" sucks
- From: Diego Novillo <dnovillo at google dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, Jeff Law <law at redhat dot com>, GCC <gcc at gcc dot gnu dot org>
- Date: Wed, 13 Nov 2013 07:29:02 -0500
- Subject: Re: Great example of why "everything is a tree" sucks
- Authentication-results: sourceware.org; auth=none
- References: <528288B3 dot 8010109 at redhat dot com> <20131112203509 dot GC27813 at tucnak dot zalov dot cz> <CAD_=9DQRZy92RCJEopO=XHMj9+eDHQ0MW1g__ZaFNNrWQW=QNg at mail dot gmail dot com> <CAFiYyc38jGfAaWwo5OWTxmQnNeP9=f5McGrW_3HCNJotvbBtKQ at mail dot gmail dot com> <CABu31nOpcf1EivKXYy-i4Czm84aSv+hOYhrSPpefzNVTjjNW0Q at mail dot gmail dot com>
On Wed, Nov 13, 2013 at 5:37 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Really the best place to start IMHO would be to evict 'tree' from the
> front ends. That would really be a step towards making the front ends
> independent of the rest of the compiler, and it would simplify changes
> towards static 'tree' types.
Each FE will be free to choose their own data structure for their
ASTs. In the case of the C based FEs, their AST *is* tree. Once the
FEs don't need to emit symbols and types using 'tree', they will be
able to use the more streamlined gimple variants.
I don't know what the gimple variants for symbols and types will look
like. They will need to have enough attributes to describe the needs
of debug info, but they will not need anything related to semantic
analysis and codegen for the source language. So, there will be
shared attributes, but they will be on completely separate modules and
type systems. That orthogonality will allow the FEs to add more
features without impacting the rest of the compiler.
Diego.