[all-commits] [llvm/llvm-project] ca6c9e: [OpenMP] Remove hidden visibility for declare targ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Jan 18 15:20:32 PST 2022


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

  Changed paths:
    M clang/lib/AST/Decl.cpp
    M clang/test/OpenMP/declare_target_codegen.cpp
    M clang/test/OpenMP/declare_target_only_one_side_compilation.cpp

  Log Message:
  -----------
  [OpenMP] Remove hidden visibility for declare target variables

This patch changes the visiblity of variables declared within a declare
target directive. Variable declarations within a declare target
directive need to be externally visible to the plugin for initialization
or reading. Previously this would cause runtime errors where the named
global could not be found because it was not included in the symbol
table.

Reviewed By: jdoerfert

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


  Commit: 4863fed933c3d85c6dba4c9ae3100c17cc295c6d
      https://github.com/llvm/llvm-project/commit/4863fed933c3d85c6dba4c9ae3100c17cc295c6d
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-01-18 (Tue, 18 Jan 2022)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/include/Types.h
    M openmp/libomptarget/DeviceRTL/src/Workshare.cpp

  Log Message:
  -----------
  [Libomptarget] Fix external visibility for internal variables

After the changes in D117362 made variables declared inside of a target
declare directive visible outside the plugin, some variables inside the
runtime were given visiblity that conflicted with their address space
type. This caused problems when shared or local memory was made
externally visible. This patch fixes this issue by making these
varialbes static within the module, therefore limiting their visibility
to being internal.

Reviewed By: jdoerfert

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


Compare: https://github.com/llvm/llvm-project/compare/fcab2d130939...4863fed933c3


More information about the All-commits mailing list