On Thu, Nov 7, 2013 at 2:44 PM, Joseph S. Myers <jos...@codesourcery.com> wrote:
> On Thu, 7 Nov 2013, Richard Biener wrote:
>
>> Well, I'm betting that you'll re-invent sth like 'tree' just don't
>> call it 'tree' ;)
>> You need to transparently refer to constants, SSA names and decls
>> (at least) as GIMPLE statement operands.  You probably will make
>> a "gimple statement operand" base class.  Well - that's a 'tree' ;)
>
> Uses of constants and decls in expressions are why it's not obvious that
> those get a static type different from expressions (or at least, they
> probably do need a common base class).  But my model of how "tree" should
> ideally be split up has expressions (maybe including decls) as a
> completely separate static type from types, and identifiers as yet another
> static type, none of those inheriting from a common base class "tree".

Sure.  Also you make containers no longer trees (TREE_CHAIN
anyone, TREE_VEC, TREE_LIST ...).  Should be the first step
I think (already started some time ago with using VECs for some
pieces).

Richard.

> --
> Joseph S. Myers
> jos...@codesourcery.com

Reply via email to