[Openmp-commits] [openmp] 762badb - [Libomptarget] Remove volatile from NVPTX work function
via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jul 19 17:03:35 PDT 2021
Author: Joseph Huber
Date: 2021-07-19T20:03:25-04:00
New Revision: 762badb0ab44a015fd066089c6b266f51ab5f703
URL: https://github.com/llvm/llvm-project/commit/762badb0ab44a015fd066089c6b266f51ab5f703
DIFF: https://github.com/llvm/llvm-project/commit/762badb0ab44a015fd066089c6b266f51ab5f703.diff
LOG: [Libomptarget] Remove volatile from NVPTX work function
Currently the NPVTX work function is marked volatile. This prevents some
optimizations from using this value.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D106310
Added:
Modified:
openmp/libomptarget/deviceRTLs/common/omptarget.h
openmp/libomptarget/deviceRTLs/common/src/omp_data.cu
Removed:
################################################################################
diff --git a/openmp/libomptarget/deviceRTLs/common/omptarget.h b/openmp/libomptarget/deviceRTLs/common/omptarget.h
index d8ea6a3966976..1464959fb6114 100644
--- a/openmp/libomptarget/deviceRTLs/common/omptarget.h
+++ b/openmp/libomptarget/deviceRTLs/common/omptarget.h
@@ -265,7 +265,7 @@ extern void *EXTERN_SHARED(ReductionScratchpadPtr);
////////////////////////////////////////////////////////////////////////////////
typedef void *omptarget_nvptx_WorkFn;
-extern volatile omptarget_nvptx_WorkFn EXTERN_SHARED(omptarget_nvptx_workFn);
+extern omptarget_nvptx_WorkFn EXTERN_SHARED(omptarget_nvptx_workFn);
////////////////////////////////////////////////////////////////////////////////
// get private data structures
diff --git a/openmp/libomptarget/deviceRTLs/common/src/omp_data.cu b/openmp/libomptarget/deviceRTLs/common/src/omp_data.cu
index 876ec7bb3a430..6c728751393f3 100644
--- a/openmp/libomptarget/deviceRTLs/common/src/omp_data.cu
+++ b/openmp/libomptarget/deviceRTLs/common/src/omp_data.cu
@@ -50,7 +50,7 @@ omptarget_nvptx_ThreadPrivateContext *
// communicate with the workers. Since it is in shared memory, there is one
// copy of these variables for each kernel, instance, and team.
////////////////////////////////////////////////////////////////////////////////
-volatile omptarget_nvptx_WorkFn SHARED(omptarget_nvptx_workFn);
+omptarget_nvptx_WorkFn SHARED(omptarget_nvptx_workFn);
////////////////////////////////////////////////////////////////////////////////
// OpenMP kernel execution parameters
More information about the Openmp-commits
mailing list