This is the mail archive of the gcc@gcc.gnu.org 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: Great example of why "everything is a tree" sucks


On Wed, Nov 13, 2013 at 5:15 AM, Richard Biener
<richard.guenther@gmail.com> wrote:

> 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.


Diego.


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