diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-11-11 04:05:39 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-11-11 04:05:39 +0000 |
commit | 40279b3558787a91503c7f4861ea771c6277fca0 (patch) | |
tree | e32f257aa9ca72122b1c84569ab7da17f5608b2a /include/clang/Serialization | |
parent | ecb1dc51d3cc67618018f8a956d062618408ab7b (diff) |
[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
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r-- | include/clang/Serialization/ASTWriter.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h index a328539b53..20e9935c0c 100644 --- a/include/clang/Serialization/ASTWriter.h +++ b/include/clang/Serialization/ASTWriter.h @@ -798,6 +798,7 @@ public: const ObjCPropertyDecl *OrigProp, const ObjCCategoryDecl *ClassExt) override; void DeclarationMarkedUsed(const Decl *D) override; + void DeclarationMarkedOpenMPThreadPrivate(const Decl *D) override; }; /// \brief AST and semantic-analysis consumer that generates a |