[OPENMP]Make __kmpc_push_tripcount thread safe.
__kmpc_push_tripcount function is not thread safe and may lead to data
race when the target regions are executed in parallel threads. The patch
makes loopTripCnt counter thread aware and stores the tripcount value
per thread in the map. Access to map is guarded by mutex to prevent
data race in the map itself.
Test is for NVPTX target because it does not work correctly on the
host. Seems to me, there is a problem in libomp with target regions in
the parallel threads.
Subscribers: guansong, jfb, jdoerfert, openmp-commits, kkwli0, caomhin
Differential Revision: https://reviews.llvm.org/D64080