[PATCH 00/15] Finish 32-bit atomics

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

We were missing the local versions of the atom_* before

Signed-off-by: Aaron Watry <awatry@gmail.com>

Not used yet...

v2: Correct int/uint behavior

Not used yet.

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Note: I also tested this on radeonsi last night.

No R600 back-end changes were needed to get all of the piglit tests
working, all existing tests for local atomics pass with just this
series applied.

--Aaron

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.

This whole series LGTM.

-Tom