From: Julian Brown <julian@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>
Cc: Thomas Schwinge <thomas@codesourcery.com>,
Andrew Stubbs <ams@codesourcery.com>
Subject: [PATCH] [og9] Use more appropriate var in localize_reductions call
Date: Fri, 06 Sep 2019 16:02:00 -0000 [thread overview]
Message-ID: <20190906160213.69722-2-julian@codesourcery.com> (raw)
In-Reply-To: <20190906160213.69722-1-julian@codesourcery.com>
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 <julian@codesourcery.com>
+
+ * gimplify.c (gimplify_omp_for): Use for_stmt in call to
+ localize_reductions.
+
2019-09-06 Julian Brown <julian@codesourcery.com>
* 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
next prev parent reply other threads:[~2019-09-06 16:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-06 16:02 [PATCH] [og9] Add omp_pause_resource{,_all} for AMD GCN Julian Brown
2019-09-06 16:02 ` Julian Brown [this message]
2019-09-06 16:02 ` [PATCH] [og9] OpenACC profiling support " Julian Brown
2023-03-10 14:07 ` Fix OpenACC/GCN 'acc_ev_enqueue_launch_end' position (was: [PATCH] [og9] OpenACC profiling support for AMD GCN) Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190906160213.69722-2-julian@codesourcery.com \
--to=julian@codesourcery.com \
--cc=ams@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=thomas@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).