[Openmp-commits] [PATCH] D73239: [nfc][libomptarget] Remove SHARED annotation from local variables

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 22 15:25:42 PST 2020


JonChesterfield created this revision.
JonChesterfield added reviewers: ABataev, jdoerfert, grokos.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.

[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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73239

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


Index: openmp/libomptarget/deviceRTLs/common/src/reduction.cu
===================================================================
--- openmp/libomptarget/deviceRTLs/common/src/reduction.cu
+++ openmp/libomptarget/deviceRTLs/common/src/reduction.cu
@@ -230,7 +230,7 @@
                           : /*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 @@
                          : /*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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73239.239720.patch
Type: text/x-patch
Size: 973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200122/b9a36d51/attachment.bin>


More information about the Openmp-commits mailing list