This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ptx preliminary address space fixes [1/4]
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 26 Sep 2014 14:05:09 +0200
- Subject: Re: ptx preliminary address space fixes [1/4]
- Authentication-results: sourceware.org; auth=none
- References: <54117552 dot 2040200 at codesourcery dot com> <CAFiYyc0z_5WsBDXyiWkKOuARuKpBK0u7hxu3WoADWOSR-f84Bg at mail dot gmail dot com> <5412D5D6 dot 2060104 at codesourcery dot com> <CAFiYyc31JduJauAPrLGAYqRQaWU9eui2NpUfzQzhqSHGq2NqWQ at mail dot gmail dot com> <54181E00 dot 3070604 at codesourcery dot com> <CAFiYyc3gky+Ga4_uyCrOC2AT8HQRauo5XV_RGSfLrdgZF_-WHg at mail dot gmail dot com> <54255553 dot 10202 at codesourcery dot com>
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
>