[OpenMP][OMPT] Fix memory leak when using GCC compatibility code
authorJonathan Peyton <jonathan.l.peyton@intel.com>
Thu, 11 Aug 2022 16:13:01 +0000 (11:13 -0500)
committerJonathan Peyton <jonathan.l.peyton@intel.com>
Thu, 11 Aug 2022 20:26:09 +0000 (15:26 -0500)
commit56f36f85e029d6947d07d7d174801104785149a7
tree15bf703c51ebdf7cfa5b8b3089ac18f26431c9c1
parent6c7b049f6eb78edf83506a858c7b211a7c70afd8
[OpenMP][OMPT] Fix memory leak when using GCC compatibility code

Serialized parallels allocate lightweight task teams on the heap
but never free them in the corresponding join. This patch adds a wrapper
around the allocation (if ompt enabled) and also adds the corresponding
free in the join call.

Differential Revision: https://reviews.llvm.org/D131690
openmp/runtime/src/kmp_runtime.cpp