[PATCH] D28753: [OpenMP] Codegen support for 'target parallel' on the host.

Arpith Jacob via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 15 16:44:19 PST 2017


arpith-jacob created this revision.
arpith-jacob added reviewers: ABataev, sfantao, carlo.bertolli, caomhin, kkwli0, gtbercea.
arpith-jacob added a subscriber: cfe-commits.
Herald added a subscriber: jholewinski.

This patch adds support for codegen of 'target parallel' on the host.
It is also the first combined directive that requires two or more
captured statements. Support for this functionality is included in
the patch.

      

A combined directive such as 'target parallel' has two captured
statements, one for the 'target' and the other for the 'parallel'
region. Two captured statements are required because each has
different implicit parameters (see SemaOpenMP.cpp). For example,
the 'parallel' has 'global_tid' and 'bound_tid' while the 'target'
does not. The patch adds support for handling multiple captured
statements based on the combined directive.

      

When codegen'ing the 'target parallel' directive, the 'target'
outlined function is created using the outer captured statement
and the 'parallel' outlined function is created using the inner
captured statement.


https://reviews.llvm.org/D28753

Files:
  include/clang/Sema/Sema.h
  lib/CodeGen/CGOpenMPRuntime.cpp
  lib/CodeGen/CGOpenMPRuntime.h
  lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  lib/CodeGen/CGOpenMPRuntimeNVPTX.h
  lib/CodeGen/CGStmtOpenMP.cpp
  lib/CodeGen/CodeGenFunction.h
  lib/Sema/SemaOpenMP.cpp
  lib/Sema/TreeTransform.h
  test/OpenMP/target_parallel_codegen.cpp
  test/OpenMP/target_parallel_codegen_registration.cpp
  test/OpenMP/target_parallel_codegen_registration_naming.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28753.84510.patch
Type: text/x-patch
Size: 96759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170116/746f4828/attachment-0001.bin>


More information about the cfe-commits mailing list