On Tue, Jun 13, 2017 at 06:48:18PM +0800, Chung-Lin Tang wrote: > Hi Jakub, > this patch has been posted before, but hasn't really been reviewed yet: > https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01927.html > > This has been deployed on gomp-4_0-branch for a long time, and was re-tested > on current trunk, test results okay.
I don't see sufficient information on what you want to change and why and whether the changes are backwards compatible (say will a valid OpenACC 2.0 program compiled by GCC 7 work against both libgomp from GCC 7 as well as one with this patch)? Can you write a few paragraphs on it (doesn't have to be comments in the source, mailing list is fine)? > @@ -318,25 +337,24 @@ GOACC_enter_exit_data (int device, size_t mapnum, > { > unsigned char kind = kinds[i] & 0xff; > > - /* Scan for PSETs. */ > - int psets = find_pset (i, mapnum, kinds); > + /* Scan for pointers and PSETs. */ > + int pointer = find_pointer (i, mapnum, kinds); > > - if (!psets) > + if (!pointer) > { > switch (kind) > { > - case GOMP_MAP_POINTER: > - gomp_acc_insert_pointer (1, &hostaddrs[i], &sizes[i], > - &kinds[i]); > + case GOMP_MAP_ALLOC: > + acc_present_or_create (hostaddrs[i], sizes[i]); > break; > case GOMP_MAP_FORCE_ALLOC: > acc_create (hostaddrs[i], sizes[i]); > break; > - case GOMP_MAP_FORCE_PRESENT: > + case GOMP_MAP_TO: > acc_present_or_copyin (hostaddrs[i], sizes[i]); > break; > case GOMP_MAP_FORCE_TO: > - acc_present_or_copyin (hostaddrs[i], sizes[i]); > + acc_copyin (hostaddrs[i], sizes[i]); > break; E.g. in this hunk you remove GOMP_MAP_POINTER and GOMP_MAP_FORCE_PRESENT handling and significantly change GOMP_MAP_FORCE_TO. The first two will now gomp_fatal, right? Can it ever appear in GOACC_enter_exit_data calls? > default: > gomp_fatal (">>>> GOACC_enter_exit_data UNHANDLED kind > 0x%.2x", Jakub