This is the mail archive of the 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: [tree-ssa] COMPOUND_EXPR removal


> But in order to have the double-linked-list exist before all the other
> containers (COND_EXPR, TRY_FINALLY_EXPR, etc) have been removed, we have
> to have a way to embed this list into existing tree nodes.  Which means
> that we need a new tree container.

which is not exactly a good idea.  Even the common core (struct
tree_common) contains bits that are clearly superfluous for the

I see two possible approaches:

1) Make the body of the container always be a tree_cell node, and add
   a special fields for it to the appropriate tree nodes.
2) Make a special tree node that contains the chain.

The second needs much less work (since you may move it towards
front-ends incrementally), the first has the advantage
of not needing the one extra container per chain.  It seems to me that
starting with the second approach and hiding the exact machinery behind
macros, then switching to the first one is the right way.

There is also other approaches:

3) Make tree_cell a field in union tree_node and teach
tree_node_structure to recognize it by some not quite mundane means;
but this seems a dirty hack to me.

4) Make code a very first field of tree node and just ignore the wasted
4 bytes per container.  Probably the easiest way, but I believe there
must be a better one.


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