[OPENMP][NVPTX]Perform memory flush if number of threads to sync is 1 or less.
According to the OpenMP standard, barrier operation must perform
implicit flush operation. Currently, if there is only one thread in the
team, barrier does not flush the memory. Patch fixes this problem.
Reviewers: grokos, gtbercea, kkwli0
Subscribers: guansong, jdoerfert, openmp-commits, caomhin
Differential Revision: https://reviews.llvm.org/D62398