[PATCH] D11361: [OpenMP] Target directive host codegen
Samuel Antao
sfantao at us.ibm.com
Mon Jul 20 11:10:00 PDT 2015
sfantao created this revision.
sfantao added reviewers: ABataev, hfinkel, rjmccall.
sfantao added a subscriber: cfe-commits.
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...). Therefore, some tweaking in the function prologue codegen is required.
The current implementation still do not support capturing of global variables. That requires a modification in Sema that I will propose in a separate patch.
Thanks!
Samuel
http://reviews.llvm.org/D11361
Files:
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGOpenMPRuntime.h
lib/CodeGen/CGStmt.cpp
lib/CodeGen/CGStmtOpenMP.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenFunction.h
test/OpenMP/target_codegen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11361.30172.patch
Type: text/x-patch
Size: 54445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150720/617b3890/attachment.bin>
More information about the cfe-commits
mailing list