[OpenMP] Use IsHostPtr where needed in rest of omptarget.cpp
authorJoel E. Denny <jdenny.ornl@gmail.com>
Wed, 1 Sep 2021 20:24:39 +0000 (16:24 -0400)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Wed, 1 Sep 2021 21:31:42 +0000 (17:31 -0400)
commit786a140650990ce9f760da5ffeb5fad0b93687d9
treee88739c92f8643d079beddf7397f02e70d743f93
parentd11bab0b73ec485f0b1e8dc38af0be72fcda1e34
[OpenMP] Use IsHostPtr where needed in rest of omptarget.cpp

As started in D107925, this patch replaces the remaining occurrences
of `UNIFIED_SHARED_MEMORY && TgtPtrBegin == HstPtrBegin` in
`omptarget.cpp` with `IsHostPtr`.  The former condition is broken in
the rare case that the device and host happen to use the same address
for their mapped allocations.  I don't know how to write a test that's
likely to reveal this case.

Reviewed By: grokos

Differential Revision: https://reviews.llvm.org/D107928
openmp/libomptarget/src/omptarget.cpp