Hi Zdenek,

> > This looks like a better approach.  How would we do your step 1?  We
> > have var_ann and tree_ann in addition to stmt_ann.  Shall we put a
> > type field at the beginning of tree_statement_list_node+stmt_ann_d so
> > that an annotation node can identify itself?  (Since all these tree
> > annotations already have a field for annotation type, it's more like
> > appending tree_statement_list_node to stmt_ann_d.)
> 
> I would go just for having
> 
> union
> {
>   struct stmt_list_node *container;   /* For gimple statements.  */
>   tree_ann_t ann;                     /* For everything else.  */
> }

Err, I don't see how to tell the garbage collector about this without
a type field.  We cannot rely on TREE_CODE (stmt) because CALL_EXPR
may appear by itself or as an rhs of MODIFY_EXPR.

Kazu Hirata

Reply via email to