diff options
| author | Michael Kruse <llvm@meinersbur.de> | 2019-08-05 18:43:21 +0000 |
|---|---|---|
| committer | Michael Kruse <llvm@meinersbur.de> | 2019-08-05 18:43:21 +0000 |
| commit | d47b9438d7b73dd7f7bf5da723ff3426af6daf9a (patch) | |
| tree | 28d843d424edcbc270f897b5b70ac4ec4a56fc39 /clang/lib/CodeGen/CGDecl.cpp | |
| parent | 37aa8ad66393290f2f786b4a834506d73b00c05e (diff) | |
| download | bcm5719-llvm-d47b9438d7b73dd7f7bf5da723ff3426af6daf9a.tar.gz bcm5719-llvm-d47b9438d7b73dd7f7bf5da723ff3426af6daf9a.zip | |
[OpenMP 5.0] Codegen support for user-defined mappers.
This patch implements the code generation for OpenMP 5.0 declare mapper
(user-defined mapper) constructs. For each declare mapper, a mapper
function is generated. These mapper functions will be called by the
runtime and/or other mapper functions to achieve user defined mapping.
The design slides can be found at
https://github.com/lingda-li/public-sharing/blob/master/mapper_runtime_design.pptx
Re-commit after revert in r367773 because r367755 changed the LLVM-IR
output such that a CHECK line failed.
Patch by Lingda Li <lildmh@gmail.com>
Differential Revision: https://reviews.llvm.org/D59474
llvm-svn: 367905
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index c6c2ff57e1c..a9e01619aab 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -2530,10 +2530,11 @@ void CodeGenModule::EmitOMPDeclareReduction(const OMPDeclareReductionDecl *D, } void CodeGenModule::EmitOMPDeclareMapper(const OMPDeclareMapperDecl *D, - CodeGenFunction *CGF) { - if (!LangOpts.OpenMP || (!LangOpts.EmitAllDecls && !D->isUsed())) + CodeGenFunction *CGF) { + if (!LangOpts.OpenMP || LangOpts.OpenMPSimd || + (!LangOpts.EmitAllDecls && !D->isUsed())) return; - // FIXME: need to implement mapper code generation + getOpenMPRuntime().emitUserDefinedMapper(D, CGF); } void CodeGenModule::EmitOMPRequiresDecl(const OMPRequiresDecl *D) { |

