[Openmp-commits] [openmp] 0e9374e - [nfc][libomptarget] Remove SHARED annotation from local variables

Jon Chesterfield via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 22 16:00:36 PST 2020


Author: Jon Chesterfield
Date: 2020-01-23T00:00:23Z
New Revision: 0e9374e3740f82f2d46af564f6b059e68ff307c8

URL: https://github.com/llvm/llvm-project/commit/0e9374e3740f82f2d46af564f6b059e68ff307c8
DIFF: https://github.com/llvm/llvm-project/commit/0e9374e3740f82f2d46af564f6b059e68ff307c8.diff

LOG: [nfc][libomptarget] Remove SHARED annotation from local variables

Summary:
[nfc][libomptarget] Remove SHARED annotation from local variables

A few local variables in reduction.cu were marked SHARED. This patch leaves
all per-kernel global state localised in omp_data.cu.

Reviewers: ABataev, jdoerfert, grokos

Reviewed By: jdoerfert

Subscribers: openmp-commits

Tags: #openmp

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

Added: 
    

Modified: 
    openmp/libomptarget/deviceRTLs/common/src/reduction.cu

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/deviceRTLs/common/src/reduction.cu b/openmp/libomptarget/deviceRTLs/common/src/reduction.cu
index 7f6ee2e39c7d..44e32cde8789 100644
--- a/openmp/libomptarget/deviceRTLs/common/src/reduction.cu
+++ b/openmp/libomptarget/deviceRTLs/common/src/reduction.cu
@@ -230,7 +230,7 @@ static int32_t nvptx_teams_reduce_nowait(int32_t global_tid, int32_t num_vars,
                           : /*Master thread only*/ 1;
   uint32_t TeamId = GetBlockIdInKernel();
   uint32_t NumTeams = GetNumberOfBlocksInKernel();
-  SHARED volatile bool IsLastTeam;
+  volatile bool IsLastTeam;
 
   // Team masters of all teams write to the scratchpad.
   if (ThreadId == 0) {
@@ -423,8 +423,8 @@ EXTERN int32_t __kmpc_nvptx_teams_reduce_nowait_v2(
                          : /*Master thread only*/ 1;
   uint32_t TeamId = GetBlockIdInKernel();
   uint32_t NumTeams = GetNumberOfBlocksInKernel();
-  SHARED unsigned Bound;
-  SHARED unsigned ChunkTeamCount;
+  unsigned Bound;
+  unsigned ChunkTeamCount;
 
   // Block progress for teams greater than the current upper
   // limit. We always only allow a number of teams less or equal


        


More information about the Openmp-commits mailing list