]> granicus.if.org Git - clang/commit
[OPENMP] Codegen for threadprivate variables
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 11 Nov 2014 04:05:39 +0000 (04:05 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Tue, 11 Nov 2014 04:05:39 +0000 (04:05 +0000)
commit40279b3558787a91503c7f4861ea771c6277fca0
treee32f257aa9ca72122b1c84569ab7da17f5608b2a
parentecb1dc51d3cc67618018f8a956d062618408ab7b
[OPENMP] Codegen for threadprivate variables
For all threadprivate variables which have constructor/destructor emit call to void __kmpc_threadprivate_register(ident_t * <Current Location>, void *<Original Global Addr>, kmpc_ctor <Constructor>, kmpc_cctor NULL, kmpc_dtor <Destructor>);
In expressions all references to such variables are replaced by calls to void *__kmpc_threadprivate_cached(ident_t *<Current Location>, kmp_int32 <Current Thread Id>, void *<Original Global Addr>, size_t <Size of Data>, void ***<Pointer to autogenerated cache – array of private copies of threadprivate variable>);
Test test/OpenMP/threadprivate_codegen.cpp checks that codegen is correct. Also it checks that codegen is correct after serialization/deserialization and one of passes verifies debug info.
Differential Revision: http://reviews.llvm.org/D4002

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221663 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/clang/AST/ASTMutationListener.h
include/clang/AST/DeclOpenMP.h
include/clang/Basic/Attr.td
include/clang/Serialization/ASTWriter.h
lib/AST/ASTContext.cpp
lib/CodeGen/CGDeclCXX.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGOpenMPRuntime.h
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/Frontend/MultiplexConsumer.cpp
lib/Parse/Parser.cpp
lib/Sema/SemaOpenMP.cpp
lib/Serialization/ASTCommon.h
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriter.cpp
test/OpenMP/threadprivate_codegen.cpp [new file with mode: 0644]
test/PCH/chain-openmp-threadprivate.cpp [new file with mode: 0644]