https://github.com/ergawy commented: Thanks Chaitanya. Just a few more comments on my side, the main of which is the need to add a call to `__kmpc_free_shared` to match the group allocations. https://github.com/llvm/llvm-project/pull/162704