[llvm-dev] RFC: Adding a !thread.private metadata

Nicolai Hähnle via llvm-dev llvm-dev at lists.llvm.org
Sun Sep 16 05:03:00 PDT 2018


On 15.09.2018 01:13, Philip Reames via llvm-dev wrote:
> Add a new metadata type which applies to memory accessing instructions 
> (store, load, atomicrmw, etc...) and indicates that the memory location 
> accessed is known to be accessed only by a single thread everywhere it 
> is dereferenceable.

What are the implications for how this interacts with fences and atomics?

For example, if there is a store to a !thread.private memory location 
before an atomic with release semantics, are we allowed to move the 
store to after the atomic?

It sounds like perhaps this would be allowed, and this could be useful 
for modeling non-coherent memory accesses in GLSL and SPIR-V.

Cheers,
Nicolai

-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the llvm-dev mailing list