[Openmp-commits] [openmp] 5102c3c - [OpenMP][FIX] Do not adjust the level after the environment was popped

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 27 16:22:48 PDT 2021


Author: Johannes Doerfert
Date: 2021-10-27T18:22:33-05:00
New Revision: 5102c3c61e266b533619644bb8eb27cecd26bfca

URL: https://github.com/llvm/llvm-project/commit/5102c3c61e266b533619644bb8eb27cecd26bfca
DIFF: https://github.com/llvm/llvm-project/commit/5102c3c61e266b533619644bb8eb27cecd26bfca.diff

LOG: [OpenMP][FIX] Do not adjust the level after the environment was popped

Exiting a data environment will reset all values, it is wrong to adjust
them afterwards.

Reviewed By: tianshilei1992

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

Added: 
    

Modified: 
    openmp/libomptarget/DeviceRTL/src/Parallelism.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp b/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
index 81af773d014a..bfdee1ca6c23 100644
--- a/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
@@ -199,7 +199,6 @@ void __kmpc_serialized_parallel(IdentTy *, uint32_t TId) {
 
 void __kmpc_end_serialized_parallel(IdentTy *, uint32_t TId) {
   state::exitDataEnvironment();
-  --icv::Level;
 }
 
 uint16_t __kmpc_parallel_level(IdentTy *, uint32_t) { return omp_get_level(); }


        


More information about the Openmp-commits mailing list