[all-commits] [llvm/llvm-project] 0dfe95: [OpenMP] Change default visibility to protected fo...

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu Jan 20 18:06:43 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0dfe953294ba1c0fc43fb710518b9b5a608b223a
      https://github.com/llvm/llvm-project/commit/0dfe953294ba1c0fc43fb710518b9b5a608b223a
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-01-20 (Thu, 20 Jan 2022)

  Changed paths:
    M clang/lib/AST/Decl.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/OpenMP/declare_target_codegen.cpp
    M clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp
    M clang/test/OpenMP/nvptx_target_pure_deleted_codegen.cpp
    M clang/test/OpenMP/nvptx_unsupported_type_codegen.cpp
    M clang/test/OpenMP/target_attribute_convergent.cpp

  Log Message:
  -----------
  [OpenMP] Change default visibility to protected for device declarations

This patch changes 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 be done by making the visibility protected by default.
With protected visibility we are asserting that the symbols on the device
will never be preempted or preempt another symbol pending a shared library
load.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D117806


  Commit: 26feef084616a18e9b61acb9c78dfca40f4c6f97
      https://github.com/llvm/llvm-project/commit/26feef084616a18e9b61acb9c78dfca40f4c6f97
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-01-20 (Thu, 20 Jan 2022)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/CMakeLists.txt
    M openmp/libomptarget/DeviceRTL/include/Types.h
    M openmp/libomptarget/DeviceRTL/src/Configuration.cpp
    M openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
    M openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
    M openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt

  Log Message:
  -----------
  [Libomptarget] Change visibility to hidden for device RTL

This patch changes the visibility for all construct in the new device
RTL to be hidden by default. This is done after the changes introduced
in D117806 changed the visibility from being hidden by default for all
device compilations. This asserts that the visibility for the device
runtime library will be hidden except for the internal environment
variable. This is done to aid optimization and linking of the device
library.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D117807


Compare: https://github.com/llvm/llvm-project/compare/156b997251db...26feef084616


More information about the All-commits mailing list