From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112804 invoked by alias); 6 Sep 2019 16:02:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 112751 invoked by uid 89); 6 Sep 2019 16:02:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1473, HContent-Transfer-Encoding:8bit X-HELO: esa4.mentor.iphmx.com Received: from esa4.mentor.iphmx.com (HELO esa4.mentor.iphmx.com) (68.232.137.252) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Sep 2019 16:02:28 +0000 IronPort-SDR: 5r23y7l3/nApw3rEjn3mHaIRQaTVoK4SqBrucP0aLEHb7SvpjhQ5viXc4K2qP4i9XZ2Tzk76Mq WBD+2Xjr7Ga2WdZ1LWOJWI5CCZ9DCMKQInih7u+Smkak3s/e84k6SyTgKsKP39TB5yMBKPAc+h IhY+NDUp3D0lYl+mdYzOAs8FFlhgK7wZ78Kq48QmnO0j49aJNUzMVuyGS7szdTQMzXhe4yoCKV DSj3w8vwGKKLiQ8s5ytHNluClTUQ83ds2q1LdkOMlDGpydblDJ2vcmCcAgELoWU7EfiBrBTVm5 siQ= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 06 Sep 2019 08:02:27 -0800 IronPort-SDR: Snx1Q96/E/rnJ4bEDuZ+cKKoSkLKwZxxegnlcBGqOwCquK1GVGNJMe9/thIoD87wLz7tlQKFur 0e7131pIf68y2usx/QL3Tlc9JsAOq6qYlJuWMmqUaaGO4l8AoDQLWMu2HUAjquw7//EdpEx0Dy aiW1+FnCJhoX/6ciMronqANyjmSP412jM6zq+iaA538TMlyYe77e6CeRrcmIbjizcqvHr07pFJ PR69TaQFp30qxuxgAdpVD8Vjf/8Sg+d2Oo0L3qInJELoweSFkqpbe3pjkGgtcvbHc9MmQGgy0k dyI= From: Julian Brown To: CC: Thomas Schwinge , Andrew Stubbs Subject: [PATCH] [og9] Use more appropriate var in localize_reductions call Date: Fri, 06 Sep 2019 16:02:00 -0000 Message-ID: <20190906160213.69722-2-julian@codesourcery.com> In-Reply-To: <20190906160213.69722-1-julian@codesourcery.com> References: <20190906160213.69722-1-julian@codesourcery.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Return-Path: julian@codesourcery.com X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00414.txt.bz2 This patch uses a more appropriate local variable in the call to localize_reductions in gimplify_omp_for, for better self-documentation. Tested with offloading to AMD GCN. I will apply to the openacc-gcc-9-branch shortly. Julian ChangeLog gcc/ * gimplify.c (gimplify_omp_for): Use for_stmt in call to localize_reductions. --- gcc/ChangeLog.openacc | 5 +++++ gcc/gimplify.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog.openacc b/gcc/ChangeLog.openacc index ffe19bc5809..02667a2aed4 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-06 Julian Brown + + * gimplify.c (gimplify_omp_for): Use for_stmt in call to + localize_reductions. + 2019-09-06 Julian Brown * config/nvptx/nvptx.c (omp-sese.h): Include. diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 3d869447d70..60761504a5e 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -11082,7 +11082,8 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p) here, because the code to remove reductions in kernels regions cannot handle that. */ if (outer && outer->region_type == ORT_ACC_PARALLEL) - localize_reductions (OMP_FOR_CLAUSES (*expr_p), OMP_FOR_BODY (*expr_p)); + localize_reductions (OMP_FOR_CLAUSES (for_stmt), + OMP_FOR_BODY (for_stmt)); } /* Set OMP_CLAUSE_LINEAR_NO_COPYIN flag on explicit linear -- 2.22.0