This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [UPC 14/22] constant folding changes
- From: Gary Funck <gary at intrepid dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Gcc Patches <gcc-patches at gcc dot gnu dot org>, Richard Sandiford <rdsandiford at googlemail dot com>, Nenad Vukicevic <nenad at intrepid dot com>
- Date: Sat, 5 Dec 2015 16:00:29 -0800
- Subject: Re: [UPC 14/22] constant folding changes
- Authentication-results: sourceware.org; auth=none
- References: <20151201060240 dot GA31253 at intrepid dot com> <alpine dot LSU dot 2 dot 11 dot 1512011244210 dot 4884 at t29 dot fhfr dot qr>
On 12/01/15 12:46:01, Richard Biener wrote:
> On Mon, 30 Nov 2015, Gary Funck wrote:
> > UPC pointers-to-shared (aka shared pointers) are not interchangeable
> > with integers as they are in regular "C". Therefore, additions
> > and subtraction operations which involve UPC shared pointers
> > should not be further simplified.
>
> This looks worrysome. I suppose this applies to simplifications
> done before lowering only? If so I wonder if not using regular
> plus/minus/convert/nop for operations on UPC shared pointers is
> better than introducing this kind of checks.
I suppose that is a possibility. We could introduce
UPC_POINTER_PLUS, UPC_POINTER_CONVERT, and so-on as needed.
Just not sure how many places that for example,
UPC_POINTER_PLUS will keep showing up alongside POINTER_PLUS
and similarly UPC_POINTER_CONVERT and CONVERT.
After lowering, All UPC-specific operations have been replaced
with the GENERIC code that implements them. We still retain
the UPC pointer-to-shared types in the tree, rather than
lowering everything to the internal representation of the
pointer-to-shared type. I recall trying to replace
pointers-to-shared with their internal representation and
ran into some issues. I think one of them is that procedures
accepting pointers-to-shared as parameters would have
an apparent type mis-match. It might have impacted debug info.
generation as well. Just don't recall.
- Gary