[Openmp-commits] [PATCH] D32325: [OpenMP] libomptarget: Remove obsolete negative device IDs -2/-3
George Rokos via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Apr 20 16:30:47 PDT 2017
grokos created this revision.
grokos added a project: OpenMP.
Herald added a subscriber: rengolin.
Early implementations of IBM's internal `declare target` implementation would call `__tgt_target` with device IDs -2 and -3 to denote constructors and destructors, respectively. The upcoming `declare target` patch for clang uses dedicated bits (`__tgt_offload_entry::flags`) to denote ctors/dtors, so the code handling calls to `__tgt_target` with devices IDs -2 and -3 is obsolete.
Repository:
rL LLVM
https://reviews.llvm.org/D32325
Files:
libomptarget/src/omptarget.cpp
libomptarget/src/omptarget.h
Index: libomptarget/src/omptarget.h
===================================================================
--- libomptarget/src/omptarget.h
+++ libomptarget/src/omptarget.h
@@ -21,8 +21,6 @@
#define OFFLOAD_FAIL (~0)
#define OFFLOAD_DEVICE_DEFAULT -1
-#define OFFLOAD_DEVICE_CONSTRUCTOR -2
-#define OFFLOAD_DEVICE_DESTRUCTOR -3
#define HOST_DEVICE -10
/// Data attributes for each data reference used in an OpenMP target region.
Index: libomptarget/src/omptarget.cpp
===================================================================
--- libomptarget/src/omptarget.cpp
+++ libomptarget/src/omptarget.cpp
@@ -2208,13 +2208,6 @@
EXTERN int __tgt_target(int32_t device_id, void *host_ptr, int32_t arg_num,
void **args_base, void **args, int64_t *arg_sizes, int32_t *arg_types) {
- if (device_id == OFFLOAD_DEVICE_CONSTRUCTOR ||
- device_id == OFFLOAD_DEVICE_DESTRUCTOR) {
- // Return immediately for the time being, target calls with device_id
- // -2 or -3 will be removed from the compiler in the future.
- return OFFLOAD_SUCCESS;
- }
-
DP("Entering target region with entry point " DPxMOD " and device Id %d\n",
DPxPTR(host_ptr), device_id);
@@ -2262,13 +2255,6 @@
EXTERN int __tgt_target_teams(int32_t device_id, void *host_ptr,
int32_t arg_num, void **args_base, void **args, int64_t *arg_sizes,
int32_t *arg_types, int32_t team_num, int32_t thread_limit) {
- if (device_id == OFFLOAD_DEVICE_CONSTRUCTOR ||
- device_id == OFFLOAD_DEVICE_DESTRUCTOR) {
- // Return immediately for the time being, target calls with device_id
- // -2 or -3 will be removed from the compiler in the future.
- return OFFLOAD_SUCCESS;
- }
-
DP("Entering target region with entry point " DPxMOD " and device Id %d\n",
DPxPTR(host_ptr), device_id);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32325.96049.patch
Type: text/x-patch
Size: 1825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170420/38ef4950/attachment.bin>
More information about the Openmp-commits
mailing list