[PATCH] D12871: [OpenMP] Target directive host codegen - rebased

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 18:53:13 PDT 2015


sfantao created this revision.
sfantao added reviewers: ABataev, hfinkel, rjmccall.
sfantao added subscribers: cfe-commits, Hahnfeld.

This patch rebases and creates a new revision for http://reviews.llvm.org/D11361 as requested by John.

Here's the adapted original summary (the global captures issue has been fixed in the meantime):

This patch implements the outlining for offloading functions for code annotated with the OpenMP target directive. It uses a temporary naming of the outlined functions that will have to be updated later on once target side codegen and registration of offloading libraries is implemented - the naming needs to be made unique in the produced library.

Unlike other captured regions, target offloading cannot use directly the Capture declaration, as each captured field has to be passed explicitly to the runtime library and associated with potentially different mapping types (to/from/alloc...). A proxy function is used to wrap the default capturing implemented in clang and adapt it to what OpenMP offloading requires.

Thanks!
Samuel

http://reviews.llvm.org/D12871

Files:
  lib/CodeGen/CGOpenMPRuntime.cpp
  lib/CodeGen/CGOpenMPRuntime.h
  lib/CodeGen/CGStmtOpenMP.cpp
  test/OpenMP/target_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12871.34774.patch
Type: text/x-patch
Size: 66168 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150915/62237d5a/attachment-0001.bin>


More information about the cfe-commits mailing list