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