From patchwork Wed Sep 9 11:26:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1360579 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BmfqD19d0z9sV5 for ; Wed, 9 Sep 2020 21:26:30 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2C28C38708A5; Wed, 9 Sep 2020 11:26:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 2F7EA385781B for ; Wed, 9 Sep 2020 11:26:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2F7EA385781B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: cU3Q4UmnCqqAo45vn21R+oizj+4GTN52GbTftp+CJOvL0a8p8npp+sbDD1XzONAtpDBdwno5e+ qivEcvS0PXV6XzTyBWlhGLPxAJCpHBjrhKPr0/fgbyPVwMWCuRYfysyqxTtYapIUsaUGDqMIGj uQIPcDi84q7tB/j80tu1FqKuoRTIP1giuXR8Vu2jdboHxJDXQxNgeJwfl8KV7CAnYSHF29hrp1 kR0vmw6b1zj/PALF4KXojEAQRColx2V3MqYRe/MvVuoT5cHPR896iUJq+SngQexJZMNal3O4m+ Dpg= X-IronPort-AV: E=Sophos;i="5.76,409,1592899200"; d="diff'?scan'208";a="54909685" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 09 Sep 2020 03:26:22 -0800 IronPort-SDR: vBemkpOXlk3vmeu4vONcf2pUI7qGfgMAsP/Nvqd/f+QYJ89BOkIqS33VwawoPFttTXZE2gyow9 YfLGQ1sJqFZQpz3PYVNGY8viBAlvJHgwTOmaMJQocVOJLRgnNpa7v3nuNo4ATZK5mSsw/k/rFa FscUpevhdS2kWQQOPfQdbkQlMub4cgrdsXY+ntTZIcV6HITojhdCIjyEBZmEcohAHYwJgNB5BZ MEhTrCUbgM2N270cRjqIWkY7TQWARFpPY0AN4sWpdvhLHRF6mwWg58be5r+QyotIjt6oP02iya naI= To: gcc-patches From: Tobias Burnus Subject: [OG10] Merge GCC into branch Message-ID: <403751ff-eb9b-8458-275a-a27505e26ee3@codesourcery.com> Date: Wed, 9 Sep 2020 13:26:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LOTSOFHASH, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" OG10 = devel/omp/gcc-10 I have merged releases/gcc-10 into that branch. This included the 'Fortran: Fixes for OpenMP loop-iter privatization (PRs 95109 + 94690)' commit, which differs between mainline and GCC 10 – and OG10 is closer to mainline. Hence, the attached patch was committed as follow-up patch to add the missing bits. Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter commit b329c58936ebbceb845e557081b3a1d0243b0794 Author: Tobias Burnus 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(-) diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp index e5465e0eb63..986eb7d31f2 100644 --- a/gcc/fortran/ChangeLog.omp +++ b/gcc/fortran/ChangeLog.omp @@ -1,3 +1,11 @@ +2020-09-09 Tobias Burnus + + Backport from mainline + 2020-09-09 Tobias Burnus + + * openmp.c (gfc_resolve_do_iterator): Remove special code + for SIMD, which is not needed. + 2020-09-01 Tobias Burnus Backport from mainline diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 2626730127b..334125e7f9a 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -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; diff --git a/gcc/testsuite/ChangeLog.omp b/gcc/testsuite/ChangeLog.omp index 132a4e7feba..d3e69738c1d 100644 --- a/gcc/testsuite/ChangeLog.omp +++ b/gcc/testsuite/ChangeLog.omp @@ -1,3 +1,11 @@ +2020-09-09 Tobias Burnus + + Backport from mainline + 2020-09-09 Tobias Burnus + + * gfortran.dg/gomp/combined-if.f90: Update scan-tree-dump-times + for 'omp simd.*if'. + 2020-09-01 Tobias Burnus Backport from mainline diff --git a/gcc/testsuite/gfortran.dg/gomp/combined-if.f90 b/gcc/testsuite/gfortran.dg/gomp/combined-if.f90 index 0bb6c28b286..003821289a6 100644 --- a/gcc/testsuite/gfortran.dg/gomp/combined-if.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/combined-if.f90 @@ -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" } }