PATCH: fix clang to emit correct addrspacecast for CUDA

Eli Bendersky eliben at google.com
Mon Mar 24 14:08:14 PDT 2014


On Mon, Mar 24, 2014 at 1:57 PM, Jingyue Wu <jingyue at google.com> wrote:

> No AFAIK. We can add the generic address space into LangAS::ID. The
> problem is though how the IR optimizer knows which number means the generic
> address space.
>

I think it would be a good idea to open a separate discussion on LLVMdev
about this, since there are several interested parties and the problem is
probably more in the LLVM domain than Clang domain at this point (after
Jingyue's patch is committed).

Eli



>
>
> On Mon, Mar 24, 2014 at 1:22 PM, Justin Holewinski <jholewinski at nvidia.com
> > wrote:
>
>>  On 03/24/2014 03:22 PM, Matt Arsenault wrote:
>>
>> On 03/24/2014 11:46 AM, Justin Holewinski wrote:
>>
>>   Of course, this also assumes address space 0 is generic.  This is
>> currently true for the in-tree targets and CUDA/OpenCL support in
>> Clang, but I don't believe its a set rule anywhere.
>>
>>  R600 wants this optimization, except the "generic" address space isn't
>> 0, and is instead some other currently undefined number.
>>
>>
>> Sounds like good justification for making this a target-independent pass,
>> then.
>>
>> Jingyue, is there anything in clang now that would prevent the generic
>> address space from being a number other than 0?
>>
>>  -Matt
>>
>>
>>
>>  ------------------------------
>>  This email message is for the sole use of the intended recipient(s) and
>> may contain confidential information.  Any unauthorized review, use,
>> disclosure or distribution is prohibited.  If you are not the intended
>> recipient, please contact the sender by reply email and destroy all copies
>> of the original message.
>>  ------------------------------
>>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140324/7d39319c/attachment.html>


More information about the cfe-commits mailing list