[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
GitOrigin-RevId: 5102c3c61e266b533619644bb8eb27cecd26bfca
diff --git a/libomptarget/DeviceRTL/src/Parallelism.cpp b/libomptarget/DeviceRTL/src/Parallelism.cpp
index 81af773..bfdee1c 100644
--- a/libomptarget/DeviceRTL/src/Parallelism.cpp
+++ b/libomptarget/DeviceRTL/src/Parallelism.cpp
@@ -199,7 +199,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(); }