[llvm-dev] RFC: Extending atomic loads and stores to floating point and vector types

Philip Reames via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 14 11:44:16 PST 2015



On 12/13/2015 01:03 PM, David Chisnall wrote:
> Hi Philip,
>
>> On 11 Dec 2015, at 02:22, Philip Reames via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> Currently, we limit atomic loads and stores to either pointer or integer types.  I would like to propose that we extend this to allow both floating point and vector types which meet the other requirements.  (i.e. power-of-two multiple of 8 bits, and aligned)
> If you’re adding support for floating point atomics, would it be possible for you to add support for atomic operations on pointers too?  Currently, front ends need to bitcast pointers to an integer type which assumes that a corresponding integer type exists (it doesn’t for us) and loses pointerness of the operand in the middle, making life annoying for garbage collection.
Currently, our support for atomics on pointers is mixed.  Atomic loads 
and stores of pointer types are supported.  atomicrmw and cmpxchg 
operations on pointers not.  I know of no reason for the distinction.

I agree that making the change you're proposing is valuable.  If you 
want to file a bug and assign it me, I'll likely get to it in the next 
couple of weeks. Alternatively, I'd be happy to review patches.  :)
>
> David
>



More information about the llvm-dev mailing list