[Libclc-dev] [PATCH 00/15] Finish 32-bit atomics

Aaron Watry awatry at gmail.com
Tue Sep 9 16:24:33 PDT 2014


This series provides implementations for all 32-bit local/global atomic
functions for architectures that have support for the underlying LLVM
instructions.

Each architecture that wishes to use them needs to map the local/global
address space to their specific addrspace identifiers.

This is done for R600, and is left as an exercise to the reader for others.

In addition, this defines the extension functions for CL 1.0 int/uint
atomics for compatibility.

This entire series has been tested on evergreen using the tests that have
been sent to the piglit mailing list. The piglit tests sadly only test the
local address space versions (the global tests won't work until we have
a working barrier(CLK_GLOBAL_MEM_FENCE) implementation committed).

If testing on evergreen, you'll need to apply the LLVM patches that I have
sent to the llvm-commits list:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140908/234548.html

Note: I'm not entirely happy with the way that the cmpxchg and min/max mappings
ended up in the r600 atomic.cl file.  If someone has time to come up with
a cleaner method, it would be welcome.  The existing implementation works fine,
it's just a bit ugly.

--Aaron





More information about the Libclc-dev mailing list