[OpenMP][libomptarget] Initialize global memory stack only once.

Summary: The global stack initialization function may be called multiple times. The initialization of the shared memory slots should only happen when the function is called for the first time for a given warp master thread.

Reviewers: grokos, carlo.bertolli, ABataev, caomhin

Reviewed By: grokos

Subscribers: guansong, openmp-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@328148 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed