]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
openmp: Add support for 'present' modifier in the Fortran parse tree dump
authorKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 14 Feb 2023 21:24:19 +0000 (21:24 +0000)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 14 Feb 2023 23:53:10 +0000 (23:53 +0000)
2023-02-14  Kwok Cheung Yeung  <kcy@codesourcery.com>

gcc/fortran/
* dump-parse-tree.cc (show_omp_namelist): Display 'present' map
modifier.
(show_omp_clauses): Display 'present' motion modifier for 'to'
and 'from' clauses.

gcc/fortran/ChangeLog.omp
gcc/fortran/dump-parse-tree.cc

index 44bc0ea1e2ad40c613317fdc4398edc37b4b7374..579d8ee7c97370c0f043b3359c726bf20258f452 100644 (file)
@@ -1,3 +1,10 @@
+2023-02-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
+
+       * dump-parse-tree.cc (show_omp_namelist): Display 'present' map
+       modifier.
+       (show_omp_clauses): Display 'present' motion modifier for 'to'
+       and 'from' clauses.
+
 2023-02-09  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
        * gfortran.h (enum gfc_omp_map_op): Add entries with 'present'
index 4da4d813d1d7b798f5ff74d9afa1c4df4dec3613..7dad3ac0307ee8102c8ea892118efa59e2b35e54 100644 (file)
@@ -1453,9 +1453,20 @@ show_omp_namelist (int list_type, gfc_omp_namelist *n)
          case OMP_MAP_TO: fputs ("to:", dumpfile); break;
          case OMP_MAP_FROM: fputs ("from:", dumpfile); break;
          case OMP_MAP_TOFROM: fputs ("tofrom:", dumpfile); break;
+         case OMP_MAP_PRESENT_ALLOC: fputs ("present,alloc:", dumpfile); break;
+         case OMP_MAP_PRESENT_TO: fputs ("present,to:", dumpfile); break;
+         case OMP_MAP_PRESENT_FROM: fputs ("present,from:", dumpfile); break;
+         case OMP_MAP_PRESENT_TOFROM:
+           fputs ("present,tofrom:", dumpfile); break;
          case OMP_MAP_ALWAYS_TO: fputs ("always,to:", dumpfile); break;
          case OMP_MAP_ALWAYS_FROM: fputs ("always,from:", dumpfile); break;
          case OMP_MAP_ALWAYS_TOFROM: fputs ("always,tofrom:", dumpfile); break;
+         case OMP_MAP_ALWAYS_PRESENT_TO:
+           fputs ("always,present,to:", dumpfile); break;
+         case OMP_MAP_ALWAYS_PRESENT_FROM:
+           fputs ("always,present,from:", dumpfile); break;
+         case OMP_MAP_ALWAYS_PRESENT_TOFROM:
+           fputs ("always,present,tofrom:", dumpfile); break;
          case OMP_MAP_DELETE: fputs ("delete:", dumpfile); break;
          case OMP_MAP_RELEASE: fputs ("release:", dumpfile); break;
          default: break;
@@ -1793,6 +1804,10 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses)
          fputs ("inscan, ", dumpfile);
        if (list_type == OMP_LIST_REDUCTION_TASK)
          fputs ("task, ", dumpfile);
+       if ((list_type == OMP_LIST_TO || list_type == OMP_LIST_FROM)
+           && omp_clauses->lists[list_type]->u.motion_modifier
+              == OMP_MOTION_PRESENT)
+         fputs ("present:", dumpfile);
        show_omp_namelist (list_type, omp_clauses->lists[list_type]);
        fputc (')', dumpfile);
       }