[PATCH] D63108: [OpenMP] Add support for handling declare target to clause when unified memory is required

Gheorghe-Teodor Bercea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 10 16:48:24 PDT 2019


gtbercea created this revision.
gtbercea added reviewers: ABataev, AlexEichenberger, caomhin.
Herald added subscribers: cfe-commits, jdoerfert, guansong.
Herald added a project: clang.

This patch adds support for the handling of the variables under the declare target to clause.

The variables in this case are handled like link variables are. A pointer is created on the host and then mapped to the device. The runtime will then copy the address of the host variable in the device pointer.


Repository:
  rC Clang

https://reviews.llvm.org/D63108

Files:
  lib/CodeGen/CGDeclCXX.cpp
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CGOpenMPRuntime.cpp
  lib/CodeGen/CGOpenMPRuntime.h
  lib/CodeGen/CodeGenModule.cpp
  test/OpenMP/nvptx_target_requires_unified_shared_memory.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63108.203936.patch
Type: text/x-patch
Size: 11049 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190610/039c7475/attachment-0001.bin>


More information about the cfe-commits mailing list