[PATCH] D117806: [OpenMP] Remove overriding visibility for device declarations

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 20 10:09:12 PST 2022


jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, JonChesterfield, ABataev.
Herald added subscribers: asavonic, guansong, yaxunl.
jhuber6 requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

This patch removes the special-case handling of visibility when
compiling for an OpenMP target offloading device. This was orignally
added as a precaution against the bug encountered in PR41826 when
symbols in the device were being preempted by shared library symbols.
This should instead by done to more specifically disable symbol
preemption on the device and allow the user to control device visibility
more directly. This is done by passing the `-Bsymbolic` flag to the
toolchain, indicating that all symbols bind locally and cannot bind to
another symbol at runtime. It is assumed now that when we compile for the
device, no symbol addresses should be preempted by pending shared library
loads.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117806

Files:
  clang/lib/AST/Decl.cpp
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp
  clang/test/OpenMP/nvptx_target_pure_deleted_codegen.cpp
  clang/test/OpenMP/nvptx_unsupported_type_codegen.cpp
  clang/test/OpenMP/target_attribute_convergent.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117806.401681.patch
Type: text/x-patch
Size: 7183 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220120/71f03cc1/attachment.bin>


More information about the cfe-commits mailing list