aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ModuleBuilder.cpp
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2019-08-05 18:43:21 +0000
committerMichael Kruse <llvm@meinersbur.de>2019-08-05 18:43:21 +0000
commitd47b9438d7b73dd7f7bf5da723ff3426af6daf9a (patch)
tree28d843d424edcbc270f897b5b70ac4ec4a56fc39 /clang/lib/CodeGen/ModuleBuilder.cpp
parent37aa8ad66393290f2f786b4a834506d73b00c05e (diff)
downloadllvm-d47b9438d7b73dd7f7bf5da723ff3426af6daf9a.zip
llvm-d47b9438d7b73dd7f7bf5da723ff3426af6daf9a.tar.gz
llvm-d47b9438d7b73dd7f7bf5da723ff3426af6daf9a.tar.bz2
[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/ModuleBuilder.cpp')
-rw-r--r--clang/lib/CodeGen/ModuleBuilder.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp
index 3b4e060..414a6b8 100644
--- a/clang/lib/CodeGen/ModuleBuilder.cpp
+++ b/clang/lib/CodeGen/ModuleBuilder.cpp
@@ -232,6 +232,9 @@ namespace {
if (auto *DRD = dyn_cast<OMPDeclareReductionDecl>(Member)) {
if (Ctx->DeclMustBeEmitted(DRD))
Builder->EmitGlobal(DRD);
+ } else if (auto *DMD = dyn_cast<OMPDeclareMapperDecl>(Member)) {
+ if (Ctx->DeclMustBeEmitted(DMD))
+ Builder->EmitGlobal(DMD);
}
}
}