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: Ian Lance Taylor <iant at google dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Eric Botcazou <ebotcazou at adacore dot com>, Richard Biener <richard dot guenther at gmail dot com>, gcc <gcc at gcc dot gnu dot org>, Steven Bosscher <stevenb dot gcc at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, Jeff Law <law at redhat dot com>
- Date: Wed, 13 Nov 2013 07:35:37 -0800
- 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> <CABu31nOpcf1EivKXYy-i4Czm84aSv+hOYhrSPpefzNVTjjNW0Q at mail dot gmail dot com> <CAFiYyc3OZhg0NvnMqkN9CLu4f6oGiV2GFM55JE17MjDAgj8Jsw at mail dot gmail dot com> <1608460 dot i0thhgDpq4 at polaris> <Pine dot LNX dot 4 dot 64 dot 1311131314190 dot 18987 at digraph dot polyomino dot org dot uk> <CAD_=9DSMc7UD=CK60QzQ1-tJnDo0FMsvLAU-0XfA4RSaNMFM0A at mail dot gmail dot com>
On Wed, Nov 13, 2013 at 5:30 AM, Diego Novillo <dnovillo@google.com> wrote:
> On Wed, Nov 13, 2013 at 8:25 AM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
>
>> assignment in general to fix bug 58943. I'd be happy for front ends to
>> move to doing all these things themselves, rather than trying to define
>> GENERIC in a way that works for every language's requirements on when
>> things are evaluated and when storage is allocated / deallocated.
>
> I agree. I would move away from trying to give FEs a target in the
> form of another high-level AST. When doing codegen, it would be
> preferable if they express all the needed semantics in GIMPLE
> directly.
That is what I wanted to do in the Go frontend, but unfortunately the
current frontend interface actually requires me to generate trees for
statements. These trees are then immediately gimplified. It's a
waste of time and space.
(I haven't tried to fix this because there are unfortunately even
bigger wastes of space in the Go frontend.)
Ian