]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[og11] Rewrite GOMP_MAP_ATTACH_DETACH mappings unconditionally
authorJulian Brown <julian@codesourcery.com>
Tue, 18 May 2021 17:10:12 +0000 (10:10 -0700)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 21 Jun 2022 13:11:37 +0000 (14:11 +0100)
It never makes sense for a GOMP_MAP_ATTACH_DETACH mapping to survive
beyond gimplify.c, so this patch rewrites such mappings to GOMP_MAP_ATTACH
or GOMP_MAP_DETACH unconditionally (rather than checking for a list
of types of OpenACC or OpenMP constructs), in cases where it hasn't
otherwise been done already in the preceding code.

2021-06-02  Julian Brown  <julian@codesourcery.com>

gcc/
* gimplify.cc (gimplify_scan_omp_clauses): Simplify condition
for changing GOMP_MAP_ATTACH_DETACH to GOMP_MAP_ATTACH or
GOMP_MAP_DETACH.

gcc/ChangeLog.omp
gcc/gimplify.cc

index f031f35d57e49648e315d4b574740ca73ba0643c..bfc3bfa18ef14fc182f4fe60b7d8fe4a7d23d171 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-02  Julian Brown  <julian@codesourcery.com>
+
+       * gimplify.cc (gimplify_scan_omp_clauses): Simplify condition
+       for changing GOMP_MAP_ATTACH_DETACH to GOMP_MAP_ATTACH or
+       GOMP_MAP_DETACH.
+
 2021-04-07  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
        * omp-low.cc (is_oacc_parallel_or_serial): Handle
index 9248ca56b162a1c638e44f7854abcbb24eb21749..4eca97d2903e8d80c47beb86b56fbb92e672a445 100644 (file)
@@ -10180,15 +10180,7 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
                skip_map_struct:
                  ;
                }
-             else if ((code == OACC_ENTER_DATA
-                       || code == OACC_EXIT_DATA
-                       || code == OACC_DATA
-                       || code == OACC_PARALLEL
-                       || code == OACC_KERNELS
-                       || code == OACC_SERIAL
-                       || code == OMP_TARGET_ENTER_DATA
-                       || code == OMP_TARGET_EXIT_DATA)
-                      && OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_ATTACH_DETACH)
+             else if (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_ATTACH_DETACH)
                {
                  gomp_map_kind k = ((code == OACC_EXIT_DATA
                                      || code == OMP_TARGET_EXIT_DATA)