[Openmp-commits] [PATCH] D112144: [OpenMP][FIX] Do not adjust the level after the environment was popped

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 20 08:46:44 PDT 2021


jdoerfert created this revision.
jdoerfert added reviewers: tianshilei1992, jhuber6.
Herald added subscribers: guansong, bollu, yaxunl.
jdoerfert requested review of this revision.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112144

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


Index: openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
===================================================================
--- openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
+++ openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
@@ -178,7 +178,6 @@
 
 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(); }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112144.380973.patch
Type: text/x-patch
Size: 455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211020/445899bd/attachment.bin>


More information about the Openmp-commits mailing list