Recent removal of the 'aux' field in tree_common

Diego Novillo dnovillo@redhat.com
Thu Feb 28 09:49:00 GMT 2002


The tree SSA code in the ast branch makes heavy use of
tree_common.aux:

struct tree_ann_def
{
  /* Basic block that contains this tree.  */
  basic_block bb;

  /* For _DECL trees, list of references made to this variable.  */
  varray_type refs;

  /* Most recent definition for this symbol.  Used when placing FUD
     chains.  */
  varref currdef;

  /* Immediately enclosing compound statement to which this tree belongs.  */
  tree compound_stmt;
};


Is the idea to remove the aux field for good?  If so, I'd like to
discuss ways of mapping mechanisms so that we can associate other
data structures to a tree.

Having the aux field is convenient because it's quick and simple.
However, it should not be in tree_common.  One thing we could do
with these tree annotations is add fields to the corresponding
tree_... structures.  For instance:

- tree_ann.bb and tree_ann.compound_stmt should go in statement
  nodes.  Those are the only tree nodes that can be mapped to a
  basic block.

- tree_ann.refs and tree_ann.currdef should go in decl nodes.

Alternatively, we could have an ID field in tree nodes, so that
we can hash them.

Suggestions?


Thanks.  Diego.



More information about the Gcc-patches mailing list