Closed PHHargrove closed 10 years ago
While doing this work I found the logic related to PTS address arithmetic was using int for internal representation of both the element size and layout qualifier of array types. I widened the ElementSize of ArrayDimensionT to be int64_t and thus match the internal rep of CharUnits which Clang uses for most sizeof-like purposes. The layout qualifier was already stored in the AST as a uint32_t, and so I changed the type of several temporaries to match.
The type changes seemed sufficiently non-controversial that I've committed them to master.. As a result I've rebased my work on this issue (as a new branch) to use the corrected types: https://github.com/PHHargrove/upc2c/compare/issue-86-v2
I am sufficiently comfortable with what I've done that I will commit to master by the end of today unless there is some objection raised.
Given
the current translation is
However, since the elemsz (
8UL
) and blockelems (4UL
) agree between the two calls, they can be merged to yield the following:The same holds true for nested
upcr_add_pshared1
orupcr_add_psharedI
calls as long as the elemsz values agree (there is no blockelems in these cases)I will be looking at this if I have time.