public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Kwok Yeung <kcy@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/omp/gcc-11] Fix is_oacc_parallel_or_serial for kernel regions
Date: Thu, 13 May 2021 16:20:27 +0000 (GMT)	[thread overview]
Message-ID: <20210513162027.984213AA7CA6@sourceware.org> (raw)

https://gcc.gnu.org/g:0257e628e4a9d22b8f404550bf147c7cf6af1c72

commit 0257e628e4a9d22b8f404550bf147c7cf6af1c72
Author: Kwok Cheung Yeung <kcy@codesourcery.com>
Date:   Wed Apr 7 12:49:31 2021 -0700

    Fix is_oacc_parallel_or_serial for kernel regions
    
    2021-04-07  Kwok Cheung Yeung  <kcy@codesourcery.com>
    
            gcc/
            * omp-low.c (is_oacc_parallel_or_serial): Handle
            GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_PARALLELIZED and
            GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GANG_SINGLE.

Diff:
---
 gcc/ChangeLog.omp | 6 ++++++
 gcc/omp-low.c     | 6 +++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index ba99bebf072..14c6f4b8403 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,9 @@
+2021-04-07  Kwok Cheung Yeung  <kcy@codesourcery.com>
+
+	* omp-low.c (is_oacc_parallel_or_serial): Handle
+	GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_PARALLELIZED and
+	GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GANG_SINGLE.
+
 2021-03-01  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
 	* omp-expand.c (expand_oacc_for): Convert .tile variable to
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 7ffcf01fe0b..0251dbe7186 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -215,7 +215,11 @@ is_oacc_parallel_or_serial (omp_context *ctx)
 	  && ((gimple_omp_target_kind (ctx->stmt)
 	       == GF_OMP_TARGET_KIND_OACC_PARALLEL)
 	      || (gimple_omp_target_kind (ctx->stmt)
-		  == GF_OMP_TARGET_KIND_OACC_SERIAL)));
+		  == GF_OMP_TARGET_KIND_OACC_SERIAL)
+	      || (gimple_omp_target_kind (ctx->stmt)
+		  == GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_PARALLELIZED)
+	      || (gimple_omp_target_kind (ctx->stmt)
+		  == GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GANG_SINGLE)));
 }
 
 /* Return whether CTX represents an OpenACC 'kernels' construct.


                 reply	other threads:[~2021-05-13 16:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210513162027.984213AA7CA6@sourceware.org \
    --to=kcy@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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).