This is the mail archive of the
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: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, GCC <gcc at gcc dot gnu dot org>
- Date: Wed, 13 Nov 2013 07:20:55 -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> <52829CB1 dot 4070006 at redhat dot com> <CAFiYyc1xbbJB=EzUa34OX1XwSSmUM_OFpeBRHUbR13zd0WU-LQ at mail dot gmail dot com>
On Wed, Nov 13, 2013 at 5:15 AM, Richard Biener
> You know - 'tree's were a design decision (well, just my guess - I wasn't
> around 25 years ago ...). They are a perfect match to represent an AST.
Yes, of course. It may have been the right decision at the time. But
design is a dynamic entity. It moves, it evolves.
Few decisions are ever "correct" in absolute terms. They are the best
compromise at the time. Revising them from time to time is useful.
> Still splitting 'tree's into a few separate classes is not hard. It's just
> work - and in the end even the frontends will benefit. Oh, and I believe
> it is a project that has a much higher success rate than trying to
> replace trees with "something else" in the GIMPLE and RTL middle-end
> only and have that cooperate sanely with the rest of the compiler.
Co-opting the same data structure for two different needs is the
design decision that we are trying to move away from. It ends up
being the bloated mess that we have today.