https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92929

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|fortran                     |middle-end
            Summary|Fortran OpenACC/OpenMP      |OpenACC/OpenMP 'target'
                   |'target' 'exit              |'exit data'/'update'
                   |data'/'update'              |optimizations
                   |optimizations               |

--- Comment #1 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Relatedly, since r228777 "Merge from gomp-4_1-branch to trunk" ("which brings
in most of the OpenMP 4.5 support for C and C++"), the following optimization
is done:

    case OMP_TARGET_ENTER_DATA:
    case OMP_TARGET_EXIT_DATA:
    case OACC_ENTER_DATA:
    case OACC_EXIT_DATA:
    case OACC_HOST_DATA:
      if (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FIRSTPRIVATE_POINTER
          || (OMP_CLAUSE_MAP_KIND (c)
              == GOMP_MAP_FIRSTPRIVATE_REFERENCE))
        /* For target {,enter ,exit }data only the array slice is
           mapped, but not the pointer to it.  */
        remove = true;
      break;

Why is this not applicable for OpenACC '!$acc update'/OpenMP '!$omp target
update', too?  (This is now also relevant for C/C++.)

Reply via email to