For example:
#pragma omp target data map(tofrom:arr[0:100]) { #pragma omp target exit data map(delete:arr[0:100]) #pragma omp target enter data map(alloc:arr[98:2]) }
Without this patch, the transfer at the end of the target data region
is broken and fails depending on the target device. According to my
read of the spec, the transfer shouldn't even be attempted because
arr[0:100] isn't (fully) present there. To fix that, this patch
makes DeviceTy::getTgtPtrBegin return null for this case.
Ah, I broke reference count decrements for implicit mappings. I think it should be true -> !IsImplicit. I'll work on another patch.