[libomptarget][AMDGPU][NFC] Split atmi_memcpy for h2d and d2h
authorPushpinder Singh <Pushpinder.Singh@amd.com>
Tue, 20 Oct 2020 09:09:29 +0000 (05:09 -0400)
committerPushpinder Singh <Pushpinder.Singh@amd.com>
Tue, 20 Oct 2020 10:29:32 +0000 (06:29 -0400)
commitaa616efbb34e6321c0f24f61e017efdcf398ba04
treeafef47156665d3bf0d3a7f82cbe266a5a8398843
parentbe2afbd019de37f1da1af9d6224972deac6f3792
[libomptarget][AMDGPU][NFC] Split atmi_memcpy for h2d and d2h

The calls to atmi_memcpy presently determine the direction of copy (host to
device or device to host) by storing pointers in a map during malloc and
looking up the pointers during memcpy. As each call site already knows the
direction, this stash+lookup can be eliminated.

This NFC will be followed by a functional one that deletes those map lookups.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D89776

Change-Id: I1d9089bc1e56b3a9a30e334735fa07dee1f84990
openmp/libomptarget/plugins/amdgpu/impl/atmi.cpp
openmp/libomptarget/plugins/amdgpu/impl/atmi_runtime.h
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp