[OpenMP] Shutdown library on Windows if possible for better OMPT behavior
authorJonathan Peyton <jonathan.l.peyton@intel.com>
Tue, 2 Oct 2018 19:15:04 +0000 (19:15 +0000)
committerJonathan Peyton <jonathan.l.peyton@intel.com>
Tue, 2 Oct 2018 19:15:04 +0000 (19:15 +0000)
commit8bb8a92de9fb63925acf402099d3e71b471aeeef
treef65d1f0cae6811fef3cb1fcac1b38ba308d667fc
parent3ca4701d357d838800c62698e27da55847c9a517
[OpenMP] Shutdown library on Windows if possible for better OMPT behavior

On Windows, child workers are terminated by the parent during the normal
program exit process (ExitProcess()) and they are not able to finish generating
their OpenMP events. We can force manual library shut down in __kmpc_end() to
fix this at least for the cases where __kmpc_end() is properly inserted.

Patch by Hansang Bae

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

llvm-svn: 343619
openmp/runtime/src/kmp_csupport.cpp