HomePhabricator

[OPENMP][NVPTX]Perform memory flush if number of threads to sync is 1 or less.

Authored by ABataev on Jul 25 2019, 8:02 AM.

Description

[OPENMP][NVPTX]Perform memory flush if number of threads to sync is 1 or less.

Summary:
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

Tags: #openmp

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

llvm-svn: 367024