This is the mail archive of the gcc@gcc.gnu.org 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: RFC: GC allocating everything with a type, part 1


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.

zw


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