FW: [Patch] Bugfix for pointer address space in atomic builtins
Anastasia Stulova
anastasia.stulova at arm.com
Thu Mar 5 10:15:27 PST 2015
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/20150305/94053932/attachment.html>
More information about the cfe-commits
mailing list