This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ptx preliminary address space fixes [1/4]


On Fri, Sep 26, 2014 at 2:00 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> 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?

If currently address-space support matches up with the C frontend
and the C standard then the middle-end has to cope with that.
In this case, cope with array element types not having address-space
qualifiers.

Richard.

>
> Bernd
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]