[OpenMP][libomptarget] Initialize global memory stack only once.
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>
Wed, 21 Mar 2018 21:02:55 +0000 (21:02 +0000)
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>
Wed, 21 Mar 2018 21:02:55 +0000 (21:02 +0000)
commit4bc36a06e22020f8e8375ae69b663edce495e004
treed93b88475670490bfadea6ec07da7748cf762519
parentefd6f1c8e2a89764d141e5c24ac768b9ed5ff05e
[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

llvm-svn: 328148
openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h