This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: [GUPC] UPC-related front-end changes
- From: Gary Funck <gary at intrepid dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Gcc Patches <gcc-patches at gcc dot gnu dot org>, Joseph Myers <joseph at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Fri, 1 Jul 2011 14:34:41 -0700
- Subject: Re: RFC: [GUPC] UPC-related front-end changes
- References: <20100708061704.GA8748@intrepid.com> <20110701183145.GD6262@intrepid.com> <20110701204255.GI16443@tyan-ft48-01.lab.bos.redhat.com>
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