commit b329c58936ebbceb845e557081b3a1d0243b0794
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Wed Sep 9 12:06:54 2020 +0200
Fortran: Fixes for OpenMP loop-iter privatization (PRs 95109 + 94690)
Contains those parts of the mainline commit
61c2d476a52bb108bd05d0226c5522bf0c4b24b5 which are not in GCC 10 and,
hence, not merged in f93eba8c5fde83100bf0854607848b6f50c8bbb2, i.e. the
additional openmp.c change and the dump change for !nvptx.
And the follow-up commit cbc12c582462c720adccef5097b3162cc77c37a2 which does:
gfortran.dg/gomp/combined-if.f90: Update nvptx tree-dump times as
nvptx has additional omp simd lines with _simt_ with -O1 and higher.
gcc/fortran/ChangeLog:
PR fortran/95109
PR fortran/94690
* openmp.c (gfc_resolve_do_iterator): Remove special code for SIMD,
which is not needed.
gcc/testsuite/ChangeLog:
PR fortran/95109
PR fortran/94690
* gfortran.dg/gomp/combined-if.f90: Update scan-tree-dump-times for
'omp simd.*if'.
(cherry picked from commit cbc12c582462c720adccef5097b3162cc77c37a2)
---
gcc/fortran/ChangeLog.omp | 8 ++++++++
gcc/fortran/openmp.c | 25 -------------------------
gcc/testsuite/ChangeLog.omp | 8 ++++++++
gcc/testsuite/gfortran.dg/gomp/combined-if.f90 | 4 ++--
4 files changed, 18 insertions(+), 27 deletions(-)
@@ -1,3 +1,11 @@
+2020-09-09 Tobias Burnus <tobias@codesourcery.com>
+
+ Backport from mainline
+ 2020-09-09 Tobias Burnus <tobias@codesourcery.com>
+
+ * openmp.c (gfc_resolve_do_iterator): Remove special code
+ for SIMD, which is not needed.
+
2020-09-01 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline
@@ -6064,31 +6064,6 @@ gfc_resolve_do_iterator (gfc_code *code, gfc_symbol *sym, bool add_clause)
if (omp_current_ctx->sharing_clauses->contains (sym))
return;
- if (omp_current_ctx->is_openmp && omp_current_ctx->code->block)
- {
- /* SIMD is handled differently and, hence, ignored here. */
- gfc_code *omp_code = omp_current_ctx->code->block;
- for ( ; omp_code->next; omp_code = omp_code->next)
- switch (omp_code->op)
- {
- case EXEC_OMP_SIMD:
- case EXEC_OMP_DO_SIMD:
- case EXEC_OMP_PARALLEL_DO_SIMD:
- case EXEC_OMP_DISTRIBUTE_SIMD:
- case EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD:
- case EXEC_OMP_TEAMS_DISTRIBUTE_SIMD:
- case EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD:
- case EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD:
- case EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD:
- case EXEC_OMP_TARGET_PARALLEL_DO_SIMD:
- case EXEC_OMP_TARGET_SIMD:
- case EXEC_OMP_TASKLOOP_SIMD:
- return;
- default:
- break;
- }
- }
-
if (! omp_current_ctx->private_iterators->add (sym) && add_clause)
{
gfc_omp_clauses *omp_clauses = omp_current_ctx->code->ext.omp_clauses;
@@ -1,3 +1,11 @@
+2020-09-09 Tobias Burnus <tobias@codesourcery.com>
+
+ Backport from mainline
+ 2020-09-09 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/gomp/combined-if.f90: Update scan-tree-dump-times
+ for 'omp simd.*if'.
+
2020-09-01 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline
@@ -104,6 +104,6 @@ contains
end module
! { dg-final { scan-tree-dump-times "(?n)#pragma omp target.* if\\(" 9 "omplower" } }
-! { dg-final { scan-tree-dump-times "(?n)#pragma omp simd.* if\\(" 4 "omplower" { target { ! offload_nvptx } } } }
-! { dg-final { scan-tree-dump-times "(?n)#pragma omp simd.* if\\(" 7 "omplower" { target { offload_nvptx } } } }
+! { dg-final { scan-tree-dump-times "(?n)#pragma omp simd.* if\\(" 5 "omplower" { target { ! offload_nvptx } } } }
+! { dg-final { scan-tree-dump-times "(?n)#pragma omp simd.* if\\(" 9 "omplower" { target { offload_nvptx } } } }
! { dg-final { scan-tree-dump-times "(?n)#pragma omp parallel.* if\\(" 6 "omplower" } }