FW: [Patch] Bugfix for pointer address space in atomic builtins

Anastasia Stulova anastasia.stulova at arm.com
Wed Mar 11 09:24:05 PDT 2015


Hi Matt,

 

Any more comments here?

 

Thanks,

Anastasia

 

From: Anastasia Stulova [mailto:anastasia.stulova at arm.com] 
Sent: 05 March 2015 18:15
To: 'Matt Arsenault'; cfe-commits at cs.uiuc.edu
Cc: Stellard, Thomas
Subject: RE: FW: [Patch] Bugfix for pointer address space in atomic builtins

 

I agree generic mechanism for address spaces is missing in Clang builtins.
Perhaps, we should look into this. 

 

However, this patch fixes builtins with custom checking which is not a
general case and I see no other way to handle those builtins but to fix them
case by case.

 

Regards,

Anastasia

 

From: Matt Arsenault [mailto:Matthew.Arsenault at amd.com] 
Sent: 03 March 2015 20:15
To: Anastasia Stulova; cfe-commits at cs.uiuc.edu
Cc: Stellard, Thomas
Subject: Re: FW: [Patch] Bugfix for pointer address space in atomic builtins

 

On 02/26/2015 03:09 AM, Anastasia Stulova wrote:

Hi Matt,

 

Thanks for your comments. 

 

> I think this needs a test that includes checking the emitted IR.



No problem. I will add that!


> Would it be reasonable to fix this more generally for all builtins? I know
this is a problem for many others that accept pointers

 


This fix is not specific to c11 compare exchange atomic, but to atomics with
a pointer as second parameter. Do you mean generalization for other
parameters here? Could you tell me what atomic functions should I be looking
at?

Anastasia

I mean generalization for other builtins with pointer operands. For example,
Tom is currently trying to fix __builtin_nanf for OpenCL. Strings in OpenCL
are in the constant address space, but the type checking of the builtin
assumes implicitly assumes the pointer should be address space 0, so the
builtin is incorrectly rejected

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150311/ae2b2c9d/attachment.html>


More information about the cfe-commits mailing list