[PATCH] D12306: [OpenMP] Implement the creation and registration of the offloading descriptor.
Samuel Antao via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 24 18:00:34 PDT 2015
sfantao created this revision.
sfantao added reviewers: ABataev, rjmccall, hfinkel.
sfantao added a subscriber: cfe-commits.
All the offloading information is bundled into a descriptor that is passed to the runtime library so that it can extract all the binaries and map variables properly. This descriptor includes the range of the target binaries (that will be defined by the linker) for each device selected by the user, as well as table with the information about each function and variable that is to be mapped (given that we do not support 'declare target' directives yet this is only implemented for function, but the logic can/will be reused).
This patch adds support for the creation of the descriptor as well as the registration/unregistration of the descriptor with the runtime library. The registration is implemented in a high priority global initializer so that the registration happens always before any initializer (that can potentially include target regions) is run.
The frontend flag (it, or something similar, will have to be promoted to driver option in the future) -omptargets= was created to exercise the new functionality. It takes the list of triples of the devices the user wants to offload to.
http://reviews.llvm.org/D12306
Files:
include/clang/Basic/DiagnosticDriverKinds.td
include/clang/Basic/LangOptions.h
include/clang/Driver/Options.td
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGOpenMPRuntime.h
lib/CodeGen/CGStmtOpenMP.cpp
lib/CodeGen/CodeGenModule.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp
test/OpenMP/target_codegen.cpp
test/OpenMP/target_codegen_registration.cpp
test/OpenMP/target_messages.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12306.33031.patch
Type: text/x-patch
Size: 44744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150825/75dbf39f/attachment-0001.bin>
More information about the cfe-commits
mailing list