[PATCH] D58638: [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier

Lingda Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 25 10:41:02 PST 2019


lildmh created this revision.
lildmh added reviewers: ABataev, hfinkel, Meinersbur, kkwli0.
lildmh added a project: OpenMP.
Herald added subscribers: cfe-commits, jdoerfert, guansong.
Herald added a project: clang.

This patch implements the parsing and sema support for OpenMP from clause with potential user-defined mappers attached. User defined mapper is a new feature in OpenMP 5.0. A from clause can have an explicit or implicit associated mapper, which instructs the compiler to generate and use customized mapping functions. An example is shown below:

  struct S { int len; int *d; };
  #pragma omp declare mapper(id: struct S s) map(s, s.d[0:s.len])
  struct S ss;
  #pragma omp target update from(mapper(id): ss) // use the mapper with name 'id' to map ss from device


Repository:
  rC Clang

https://reviews.llvm.org/D58638

Files:
  include/clang/AST/OpenMPClause.h
  include/clang/Basic/OpenMPKinds.def
  include/clang/Basic/OpenMPKinds.h
  include/clang/Sema/Sema.h
  lib/AST/OpenMPClause.cpp
  lib/Basic/OpenMPKinds.cpp
  lib/Parse/ParseOpenMP.cpp
  lib/Sema/SemaOpenMP.cpp
  lib/Sema/TreeTransform.h
  lib/Serialization/ASTReader.cpp
  lib/Serialization/ASTWriter.cpp
  test/OpenMP/declare_mapper_ast_print.c
  test/OpenMP/declare_mapper_ast_print.cpp
  test/OpenMP/declare_mapper_codegen.cpp
  test/OpenMP/declare_mapper_messages.c
  test/OpenMP/declare_mapper_messages.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58638.188215.patch
Type: text/x-patch
Size: 30964 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190225/e4c10d48/attachment-0001.bin>


More information about the cfe-commits mailing list