Skip to content

Commit

Permalink
[OpenMP] libomptarget: Remove obsolete negative device IDs -2/-3
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D32325

llvm-svn: 301075
  • Loading branch information
George Rokos committed Apr 22, 2017
1 parent 6c79cc2 commit f9cb9c1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
14 changes: 0 additions & 14 deletions openmp/libomptarget/src/omptarget.cpp
Expand Up @@ -2208,13 +2208,6 @@ static int target(int32_t device_id, void *host_ptr, int32_t arg_num,

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);

Expand Down Expand Up @@ -2262,13 +2255,6 @@ EXTERN int __tgt_target_nowait(int32_t device_id, void *host_ptr,
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);

Expand Down
2 changes: 0 additions & 2 deletions openmp/libomptarget/src/omptarget.h
Expand Up @@ -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.
Expand Down

0 comments on commit f9cb9c1

Please sign in to comment.