On 07/01/11 22:42:55, Jakub Jelinek wrote: > On Fri, Jul 01, 2011 at 11:31:45AM -0700, Gary Funck wrote: > > @@ -2405,6 +2469,9 @@ struct GTY(()) tree_type_common { > > alias_set_type alias_set; > > tree pointer_to; > > tree reference_to; > > + /* UPC: for block-distributed arrays */ > > + tree block_factor; > > > > I think this is undesirable. Using a single bit and looking > it up in a hash table might be a better solution, the vast majority > of the types aren't going to be UPC block distributed arrays.
Jakub, it is true that the vast majority of types will not have a UPC blocking factor. However, building a hash table will be complicated by questions of the scope and lifetime of the type that references the blocking factor in a hash table. Implementing the hash table sounds like it might be quite a bit of work. Is there precedent for this technique being used in other GCC front-ends? Some other fields in a tree_type_common node are also likely not used by very many types (or in the case of the symtab info. are only used, for example, if debug info. is being generated?): * attributes * reference_to * tree_type_symtab * name Is there some way to use the language specific information hook? struct GTY(()) tree_type_with_lang_specific { struct tree_type_common common; /* Points to a structure whose details depend on the language in use. */ struct lang_type *lang_specific; }; - Gary