From patchwork Fri Jul 28 13:04:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frederik Harwath X-Patchwork-Id: 1814275 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RC7DG6yqYz1ybX for ; Fri, 28 Jul 2023 23:05:50 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 871B1383E8F6 for ; Fri, 28 Jul 2023 13:05:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id B1D87385841B for ; Fri, 28 Jul 2023 13:05:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B1D87385841B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="6.01,237,1684828800"; d="scan'208";a="14532019" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 28 Jul 2023 05:04:56 -0800 IronPort-SDR: P8ruQTQeHgcTam0EndK/PhnJVgwD/Mr8qJLkLDd7MGFoNngKPn5b5u44oH/upNCbbzv/iYIzr6 0LvjdNnxtRM+5BmThRyF7+YwkJQX+LSP1f0rm11oK15Z8xwIm4UT7bbHUxh8kHImLIOIb4IKqD 04hSVZlJ4DLLIdyVEshMO+4/vFLHPfaYnipI5YlG+F7JMCqZcoUKah+KduXIG+fNS7Ws5NFUgO tmOu/O2zO3CovnpVO21d39SnRD21k2bqinAYFNKFgM//Q29unT4/dLLFYtrBG5M20FkRXKjJZk Ypc= From: Frederik Harwath To: , , Subject: [PATCH 3/4] openmp: Fix diagnostic message for "omp unroll" Date: Fri, 28 Jul 2023 13:04:32 +0000 Message-ID: <20230728130433.2377366-4-frederik@codesourcery.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230728130433.2377366-1-frederik@codesourcery.com> References: <20230324153046.3996092-1-frederik@codesourcery.com> <20230728130433.2377366-1-frederik@codesourcery.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" gcc/ChangeLog: * omp-transform-loops.cc (print_optimized_unroll_partial_msg): Output "omp unroll partial" instead of "omp unroll auto". (optimize_transformation_clauses): Likewise. libgomp/ChangeLog: * testsuite/libgomp.fortran/loop-transforms/unroll-6.f90: Adjust. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/loop-transforms/unroll-8.f90: Adjust. * gfortran.dg/gomp/loop-transforms/unroll-9.f90: Adjust. --- gcc/omp-transform-loops.cc | 4 ++-- gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-8.f90 | 2 +- gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-9.f90 | 2 +- .../testsuite/libgomp.fortran/loop-transforms/unroll-6.f90 | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) -- 2.36.1 ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 diff --git a/gcc/omp-transform-loops.cc b/gcc/omp-transform-loops.cc index 275a5260dae..c8853bcee89 100644 --- a/gcc/omp-transform-loops.cc +++ b/gcc/omp-transform-loops.cc @@ -1423,7 +1423,7 @@ print_optimized_unroll_partial_msg (tree c) tree unroll_factor = OMP_CLAUSE_UNROLL_PARTIAL_EXPR (c); dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, dump_loc, "replaced consecutive % directives by " - "%\n", tree_to_uhwi (unroll_factor)); } @@ -1483,7 +1483,7 @@ optimize_transformation_clauses (tree clauses) dump_printf_loc ( MSG_OPTIMIZED_LOCATIONS, dump_loc, - "removed useless % directives " + "removed useless % directives " "preceding 'omp unroll full'\n"); } } diff --git a/gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-8.f90 b/gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-8.f90 index fd687890ee6..dab3f0fb5cf 100644 --- a/gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-8.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-8.f90 @@ -5,7 +5,7 @@ subroutine test1 implicit none integer :: i !$omp parallel do collapse(1) - !$omp unroll partial(4) ! { dg-optimized {replaced consecutive 'omp unroll' directives by 'omp unroll auto\(24\)'} } + !$omp unroll partial(4) ! { dg-optimized {replaced consecutive 'omp unroll' directives by 'omp unroll partial\(24\)'} } !$omp unroll partial(3) !$omp unroll partial(2) !$omp unroll partial(1) diff --git a/gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-9.f90 b/gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-9.f90 index 928ca44e811..91e13ff1b37 100644 --- a/gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-9.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/loop-transforms/unroll-9.f90 @@ -4,7 +4,7 @@ subroutine test1 implicit none integer :: i - !$omp unroll full ! { dg-optimized {removed useless 'omp unroll auto' directives preceding 'omp unroll full'} } + !$omp unroll full ! { dg-optimized {removed useless 'omp unroll partial' directives preceding 'omp unroll full'} } !$omp unroll partial(3) !$omp unroll partial(2) !$omp unroll partial(1) diff --git a/libgomp/testsuite/libgomp.fortran/loop-transforms/unroll-6.f90 b/libgomp/testsuite/libgomp.fortran/loop-transforms/unroll-6.f90 index 1df8ce8d5bb..b953ce31b5b 100644 --- a/libgomp/testsuite/libgomp.fortran/loop-transforms/unroll-6.f90 +++ b/libgomp/testsuite/libgomp.fortran/loop-transforms/unroll-6.f90 @@ -22,7 +22,7 @@ contains sum = 0 !$omp parallel do reduction(+:sum) lastprivate(i) - !$omp unroll partial(5) ! { dg-optimized {replaced consecutive 'omp unroll' directives by 'omp unroll auto\(50\)'} } + !$omp unroll partial(5) ! { dg-optimized {replaced consecutive 'omp unroll' directives by 'omp unroll partial\(50\)'} } !$omp unroll partial(10) do i = 1,n,step sum = sum + 1 @@ -36,7 +36,7 @@ contains sum = 0 !$omp parallel do reduction(+:sum) lastprivate(i) do i = 1,n,step - !$omp unroll full ! { dg-optimized {removed useless 'omp unroll auto' directives preceding 'omp unroll full'} } + !$omp unroll full ! { dg-optimized {removed useless 'omp unroll partial' directives preceding 'omp unroll full'} } !$omp unroll partial(10) do j = 1, 1000 sum = sum + 1