ptx preliminary address space fixes [1/4]

Richard Biener richard.guenther@gmail.com
Fri Sep 26 16:24:00 GMT 2014


On September 26, 2014 5:14:24 PM CEST, Bernd Schmidt <bernds@codesourcery.com> wrote:
>On 09/26/2014 02:42 PM, Richard Biener wrote:
>> On Fri, Sep 26, 2014 at 2:28 PM, Bernd Schmidt
><bernds@codesourcery.com> wrote:
>>> On 09/26/2014 02:26 PM, Richard Biener wrote:
>>>>
>>>> On Fri, Sep 26, 2014 at 2:14 PM, Bernd Schmidt
><bernds@codesourcery.com>
>>>> wrote:
>>>>>
>>>>> On 09/26/2014 02:05 PM, Richard Biener wrote:
>>>>>>
>>>>>>
>>>>>> 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.
>>>>>
>>>>>
>>>>>
>>>>> That's the opposite of what happens. The C frontend makes array
>element
>>>>> types have address-space qualifiers but not the array type.
>>>>
>>>>
>>>> Ah, ok.  Then the opposite way around ;)
>>>
>>>
>>> Ok, so that means that my original patch which updated the element
>types for
>>> arrays is in fact the way to go?
>>
>> It seems to do both, apply the as to the array _and_ the element
>type, no?
>
>Yes. I guess I could not do this, but then the patch will also have to 
>replace all but very few uses of TYPE_ADDR_SPACE outside the C frontend
>
>with a new addr_space_for_type function that checks for arrays.

You have the reference_addr_space function for that.

Richard.

>I can do that, but to me it feels like utterly the wrong way to go. If 
>you're sure that's what you want, I'll make a patch.
>
>
>Bernd




More information about the Gcc-patches mailing list