This patch adds support for using unified memory in the case of regular maps that happen when a target region is offloaded to the device.
For cases where only a single version of the data is required then the host address can be used. When variables need to be privatized in any way or globalized, then the copy to the device is still required for correctness.
I'm not fond of changing the API and I'm not sure why we need to: If the program uses unified memory, the generic part of libomptarget should not call the plugin (except for firstprivates, as I understand the code). Am I missing something that wouldn't make this work?