[UPC 15/22] RTL changes

Jakub Jelinek jakub@redhat.com
Wed Dec 2 12:24:00 GMT 2015


On Wed, Dec 02, 2015 at 01:10:44PM +0100, Richard Biener wrote:
> > UPC pointers-to-shared have an internal representation which is
> > defined as a 'struct' with three fields.  Special logic is
> > needed in promote_mode() to handle this case.
> 
> Errr - but how are 'struct's ever REFERENCE_TYPE or POINTER_TYPE?

Then obviously the FE should lower the pointers to RECORD_TYPEs
then and present it to the middle-end as RECORD_TYPE.  For debug info,
the FEs lang flag or whatever on the side info should through some langhook
propagate the info that some var is a UPC pointer to shared into the debug
info, but the middle-end should treat it as any other RECORD_TYPE
afterwards.

> > 2015-11-30  Gary Funck  <gary@intrepid.com>
> >
> >         gcc/
> >         * explow.c (promote_mode): For UPC pointer-to-shared values,
> >         return the mode of the UPC PTS representation type.
> >
> > Index: gcc/explow.c
> > ===================================================================
> > --- gcc/explow.c        (.../trunk)     (revision 231059)
> > +++ gcc/explow.c        (.../branches/gupc)     (revision 231080)
> > @@ -794,6 +794,8 @@ promote_mode (const_tree type ATTRIBUTE_
> >      case REFERENCE_TYPE:
> >      case POINTER_TYPE:
> >        *punsignedp = POINTERS_EXTEND_UNSIGNED;
> > +      if (SHARED_TYPE_P (TREE_TYPE (type)))
> > +        return TYPE_MODE (upc_pts_type_node);
> >        return targetm.addr_space.address_mode
> >                (TYPE_ADDR_SPACE (TREE_TYPE (type)));
> >        break;

	Jakub



More information about the Gcc-patches mailing list