[PATCH] [OPENMP] Codegen for "#pragma omp atomic write"
Alexey Bataev
a.bataev at hotmail.com
Mon Feb 2 18:56:32 PST 2015
Hi rjmccall, fraggamuffin, ejstotzer,
For global reg lvalue - use regular store through global register.
For simple lvalue - use simple atomic store.
For bitfields, vector element, extended vector elements - the original value of the whole storage (for vector elements) or of some aligned value (for bitfields) is atomically read, the part of this value for the given lvalue is modified and then use atomic compare-and-exchange operation to try to atomically write modified value (if it was not modified).
http://reviews.llvm.org/D7369
Files:
lib/CodeGen/CGAtomic.cpp
lib/CodeGen/CGStmtOpenMP.cpp
lib/Sema/SemaOpenMP.cpp
test/OpenMP/atomic_read_codegen.c
test/OpenMP/atomic_write_codegen.c
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7369.19209.patch
Type: text/x-patch
Size: 59400 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150203/91f1d469/attachment.bin>
More information about the cfe-commits
mailing list