HomePhabricator

[OPENMP, NVPTX] Fixed codegen for orphaned parallel region.

Authored by ABataev on May 25 2018, 1:16 PM.

Description

[OPENMP, NVPTX] Fixed codegen for orphaned parallel region.

If orphaned parallel region is found, the next code must be emitted:

if(__kmpc_is_spmd_exec_mode() || __kmpc_parallel_level(loc, gtid))
  Serialized execution.
else if (IsMasterThread())
  Prepare and signal worker.
else
  Outined function call.

llvm-svn: 333301

Details