This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: GC allocating everything with a type, part 1
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Steven Bosscher <stevenb at suse dot de>, gcc at gcc dot gnu dot org,geoffk at apple dot com, dberlin at dberlin dot org
- Date: Sun, 18 Jan 2004 17:45:21 +0100
- Subject: Re: RFC: GC allocating everything with a type, part 1
- References: <200401171829.05985.stevenb@suse.de> <878yk69cdg.fsf@codesourcery.com>
> Steven Bosscher <stevenb@suse.de> writes:
>
> > There are at least two types that need to be special-cased (perhaps more,
> > but I haven't found them yet -- but probably not many). These are the
> > types that do not have a fixed size, such as our core types, the unions
> > rtx_def and tree_node. The macros for these types accept an extra SIZE
> > argument as follows:
> >
> > #define ggc_alloc_tree_node(SIZE) \
> > ggc_alloc_typed(gt_ggc_e_9tree_node, SIZE)
> >
> > and
> >
> > #define ggc_alloc_rtx_def(SIZE) \
> > ggc_alloc_typed(gt_ggc_e_7rtx_def, SIZE)
> >
> > I want these defines to be generated automatically, and the only way I
> > could think of to tell gengtype about these special cases is by adding
> > an extra GTY parameter, "size_not_fixed". That's a bit ugly, if people
> > have other suggestions then let me know please.
>
> Would it not be appropriate to have separate type codes for every rtx
> and tree code? This suffices to dispose of many, although not all, of
> the cases where the type doesn't determine the size.
We sometimes change codes in place, like converting reg to mem,
CODE_LAEBL to note and such. Not sure whether it is stopper here :)
Honza
>
> zw