[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)
commit251e1488e195a0ab618e503fe5b2bc8ff18d1724
treefb857506e530be8dff680a7f283eaad431bdf545
parent6b653fc70ffdc3ec685a435b42c45611e21d407c
[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

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