This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Pass specific annotation data for trees
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: 21 May 2004 15:48:54 -0400
- Subject: Re: Pass specific annotation data for trees
- References: <68C3789B-AB52-11D8-AA84-000A95DA505C@dberlin.org>
On Fri, 2004-05-21 at 14:12, Daniel Berlin wrote:
> Currently, we use the tree annotations for some pass specific data
> (in_ccp_worklist in stmt_ann_t, partition/root_index in var_ann_t,
> etc).
>
> There are a variety of solutions, such as union of pass specific
> structures (like so):
>
> struct stmt_ann_d
> {
> <common statement stuff>
> union
> {
> struct pass_ccp *ccp_data;
> struct pass_whatever *whatever_data;
> }
> }
If doing this, you have to be careful that a pass isn't called from
within another pass. out-of-ssa can be called from within DOM, for
instance, so dom and out-of-ssa can't have their pass info in a union.
This is the same situation we have with tree_nodes and all the
bits/flags found therein.
Andrew