ptx preliminary address space fixes [1/4]

Bernd Schmidt bernds@codesourcery.com
Fri Sep 26 12:01:00 GMT 2014


On 09/16/2014 02:59 PM, Richard Biener wrote:
> On Tue, Sep 16, 2014 at 1:24 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
>> Ok, so testing seems to show that nothing breaks with the ARRAY_TYPE special
>> case removed. However, I remembered another reason to do this, and it's for
>> consistency with how address spaces are represented in other parts of the
>> compiler - specifically, the C frontend.
>>
>> C has the notion that arrays don't have type qualifiers, so to get the
>> address space of an array you'd have to look at the address space of its
>> element types. Joseph has in the past rejected patches to fix this
>> inconsistency. For other types like structs or vectors (as we saw in the
>> tree-vect patch) it's the outermost type that has the address space
>> information.
>>
>> I guess I'll declare myself agnostic, let me know whatever variant you want
>> to have here (fixing up all types or not fixing arrays) and I'll make a new
>> patch.
>
> Hmm.  How is it with other compositive types like vectors and complex?
> It's bad that the middle-end needs to follow a specific frontends need.
> Why's the representation tied so closely together?
>
> OTOH that address-spaces are "qualifiers" is an implementation detail
> (and maybe not the very best).  So I don't see how the C frontend
> needs to view them as qualifiers?

So what's the conclusion here? What should I be doing with the patch?


Bernd



More information about the Gcc-patches mailing list