On 09/11/2014 01:29 PM, Richard Biener wrote:
+  if (TREE_CODE (type) == ARRAY_TYPE)
+    TREE_TYPE (type) = apply_as_to_type (TREE_TYPE (type), as);

why is this necessary for ARRAY_TYPE but not for sth like
a RECORD_TYPE or a POINTER_TYPE?

Still testing whether I actually strictly need it for ARRAY_TYPE nowadays (these patches are really old...). However, the TYPE_FIELDS of a RECORD_TYPE seem to be mostly ignored once the frontends are done, but it's very easy for other parts of the compiler to take the TREE_TYPE of an ARRAY_TYPE. Fixing that up is simple and seems like a good thing to do for consistency (I notice that maybe I should add VECTOR_TYPE).

For a POINTER_TYPE, it is correct not to modify the pointed-to type. We want to express that a variable of that pointer type lives in an address space, not that the pointed-to type is different.

The name apply_as_to_type looks odd to me - other address-space
related functions use addr_space - can you change it to that please?

Will change, and update the other patches accordingly.


Bernd

Reply via email to