[PATCH] D14940: [OpenMP] Update target directive codegen to use 4.5 implicit data mappings.

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 23 15:51:25 PST 2015


sfantao created this revision.
sfantao added reviewers: ABataev, hfinkel, rjmccall.
sfantao added subscribers: carlo.bertolli, cfe-commits.

This patch implements the 4.5 specification for the implicit data maps. OpenMP 4.5 specification changes the default way data is captured into a target region. All the non-aggregate kinds are passed by value by default. This required activating the capturing by value during SEMA for the target region. All the non-aggregate values that can be encoded in the size of a pointer are properly casted and forwarded to the runtime library. On top of fixing the previous weird behavior for mapping pointers in nested data regions (an explicit map was always required), this also improves performance as the number of allocations/transactions to the device per non-aggregate map are reduced from two to only one - instead of passing a reference and the value, only the value passed.

Explicit maps will be added later on once firstprivate, private, and map clauses' SEMA and parsing are available.


http://reviews.llvm.org/D14940

Files:
  include/clang/AST/Stmt.h
  include/clang/Sema/Sema.h
  lib/CodeGen/CGOpenMPRuntime.cpp
  lib/CodeGen/CGStmtOpenMP.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaOpenMP.cpp
  lib/Sema/SemaStmt.cpp
  test/OpenMP/target_codegen.cpp
  test/OpenMP/target_codegen_global_capture.cpp
  test/OpenMP/target_map_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14940.40993.patch
Type: text/x-patch
Size: 129077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151123/efd1872c/attachment-0001.bin>


More information about the cfe-commits mailing list