[Openmp-commits] [PATCH] D117526: [Libomptarget] Fix external visibility for internal variables

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 18 09:53:44 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0203ff19602d: [Libomptarget] Fix external visibility for internal variables (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117526/new/

https://reviews.llvm.org/D117526

Files:
  openmp/libomptarget/DeviceRTL/include/Types.h
  openmp/libomptarget/DeviceRTL/src/Workshare.cpp


Index: openmp/libomptarget/DeviceRTL/src/Workshare.cpp
===================================================================
--- openmp/libomptarget/DeviceRTL/src/Workshare.cpp
+++ openmp/libomptarget/DeviceRTL/src/Workshare.cpp
@@ -46,7 +46,7 @@
 #pragma omp declare target
 
 // TODO: This variable is a hack inherited from the old runtime.
-uint64_t SHARED(Cnt);
+static uint64_t SHARED(Cnt);
 
 template <typename T, typename ST> struct omptarget_nvptx_LoopSupport {
   ////////////////////////////////////////////////////////////////////////////////
@@ -443,7 +443,7 @@
 
 // TODO: This is a stopgap. We probably want to expand the dispatch API to take
 //       an DST pointer which can then be allocated properly without malloc.
-DynamicScheduleTracker *THREAD_LOCAL(ThreadDSTPtr);
+static DynamicScheduleTracker *THREAD_LOCAL(ThreadDSTPtr);
 
 // Create a new DST, link the current one, and define the new as current.
 static DynamicScheduleTracker *pushDST() {
Index: openmp/libomptarget/DeviceRTL/include/Types.h
===================================================================
--- openmp/libomptarget/DeviceRTL/include/Types.h
+++ openmp/libomptarget/DeviceRTL/include/Types.h
@@ -193,7 +193,8 @@
 // TODO: clang should use address space 5 for omp_thread_mem_alloc, but right
 //       now that's not the case.
 #define THREAD_LOCAL(NAME)                                                     \
-  NAME [[clang::loader_uninitialized, clang::address_space(5)]]
+  NAME [[clang::loader_uninitialized, clang::address_space(5),                 \
+         gnu::visibility("hidden")]]
 
 // TODO: clang should use address space 4 for omp_const_mem_alloc, maybe it
 //       does?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117526.400891.patch
Type: text/x-patch
Size: 1685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220118/a8583cd1/attachment.bin>


More information about the Openmp-commits mailing list