On Wed, 11 Nov 2015, Jakub Jelinek wrote: > Hi! > > Alex reported to me privately that with the OpenMP 4.5 handling of > array section bases (that they are firstprivate instead of mapped) > we unnecessarily mark the pointers addressable and that result > in less efficient way of passing them as shared to inner constructs.
Thanks! Would you be interested in further (minimized) cases where new implementation no longer manages to perform copy-in/copy-out optimization? E.g. the following. Or I can try to put such cases in Bugzilla, if you like. Alexander void f(int *p, int n) { int tmp; #pragma omp target map(to:p[0:n]) map(tofrom:tmp) { #pragma omp parallel asm volatile ("" : "=r" (tmp) : "r" (p)); } #pragma omp target /* Missing optimization for 'tmp' here. */ #pragma omp parallel asm volatile ("" : : "r" (tmp)); }