]> granicus.if.org Git - clang/commit
[OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive.
authorMichael Kruse <llvm@meinersbur.de>
Fri, 1 Feb 2019 20:25:04 +0000 (20:25 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Fri, 1 Feb 2019 20:25:04 +0000 (20:25 +0000)
commite93ddfad28fbdc140c8b92f273c602876342d030
tree209f50f471495cb225569725973028e1975974e2
parentaa117bd55e0d8e249f08c7072dda226804066438
[OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive.

This patch implements parsing and sema for "omp declare mapper"
directive. User defined mapper, i.e., declare mapper directive, is a new
feature in OpenMP 5.0. It is introduced to extend existing map clauses
for the purpose of simplifying the copy of complex data structures
between host and device (i.e., deep copy). An example is shown below:

    struct S {  int len;  int *d; };
    #pragma omp declare mapper(struct S s) map(s, s.d[0:s.len]) // Memory region that d points to is also mapped using this mapper.

Contributed-by: Lingda Li <lildmh@gmail.com>
Differential Revision: https://reviews.llvm.org/D56326

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352906 91177308-0d34-0410-b5e6-96231b3b80d8
39 files changed:
include/clang/AST/DeclBase.h
include/clang/AST/DeclCXX.h
include/clang/AST/DeclOpenMP.h
include/clang/AST/RecursiveASTVisitor.h
include/clang/Basic/DeclNodes.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/OpenMPKinds.def
include/clang/Parse/Parser.h
include/clang/Sema/Sema.h
include/clang/Serialization/ASTBitCodes.h
lib/AST/ASTDumper.cpp
lib/AST/CXXInheritance.cpp
lib/AST/DeclBase.cpp
lib/AST/DeclOpenMP.cpp
lib/AST/DeclPrinter.cpp
lib/AST/ItaniumMangle.cpp
lib/AST/MicrosoftMangle.cpp
lib/Basic/OpenMPKinds.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/Parse/ParseOpenMP.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaLookup.cpp
lib/Sema/SemaOpenMP.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Serialization/ASTCommon.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
test/OpenMP/declare_mapper_ast_print.c [new file with mode: 0644]
test/OpenMP/declare_mapper_ast_print.cpp [new file with mode: 0644]
test/OpenMP/declare_mapper_messages.c [new file with mode: 0644]
test/OpenMP/declare_mapper_messages.cpp [new file with mode: 0644]
tools/libclang/CIndex.cpp