From: Thomas Schwinge <thomas@codesourcery.com>
To: Tobias Burnus <tobias@codesourcery.com>, <gcc-patches@gcc.gnu.org>
Cc: Jakub Jelinek <jakub@redhat.com>
Subject: Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place (was: [Patch] OpenMP: Move omp requires checks to libgomp)
Date: Wed, 6 Jul 2022 12:30:47 +0200 [thread overview]
Message-ID: <87wncq4joo.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <07fec82a-41cf-fdc5-6307-c068dd95ef1a@mentor.com>
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
Hi!
On 2022-06-08T05:56:02+0200, Tobias Burnus <Tobias_Burnus@mentor.com> wrote:
> This is based on Chung-Lin's patch at https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563393.html
> --- a/include/gomp-constants.h
> +++ b/include/gomp-constants.h
> +/* Flag values for requires-directive features, must match corresponding
> + OMP_REQUIRES_* values in gcc/omp-general.h. */
> +#define GOMP_REQUIRES_UNIFIED_ADDRESS 0x10
> +#define GOMP_REQUIRES_UNIFIED_SHARED_MEMORY 0x20
> +#define GOMP_REQUIRES_REVERSE_OFFLOAD 0x80
To make things more failure proof, OK to push the attached
"Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place"?
Grüße
Thomas
-----------------
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Define-OMP_REQUIRES_-.-GOMP_REQUIRES_-.-in-a-single-.patch --]
[-- Type: text/x-diff, Size: 2120 bytes --]
From bd1aa5bc96e141a85bb53d61a5c7531e09ea3cf6 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue, 5 Jul 2022 11:04:46 +0200
Subject: [PATCH] Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a
single place
Clean up for recent commit 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0
"OpenMP: Move omp requires checks to libgomp".
gcc/
* omp-general.h (enum omp_requires): Use 'GOMP_REQUIRES_[...]'.
include/
* gomp-constants.h (OMP_REQUIRES_[...]): Update comment.
---
gcc/omp-general.h | 8 ++++----
include/gomp-constants.h | 3 +--
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/gcc/omp-general.h b/gcc/omp-general.h
index 7a94831e8f5..74e90e1a71a 100644
--- a/gcc/omp-general.h
+++ b/gcc/omp-general.h
@@ -126,12 +126,12 @@ extern int oacc_get_ifn_dim_arg (const gimple *stmt);
enum omp_requires {
OMP_REQUIRES_ATOMIC_DEFAULT_MEM_ORDER = 0xf,
- OMP_REQUIRES_UNIFIED_ADDRESS = 0x10,
- OMP_REQUIRES_UNIFIED_SHARED_MEMORY = 0x20,
+ OMP_REQUIRES_UNIFIED_ADDRESS = GOMP_REQUIRES_UNIFIED_ADDRESS,
+ OMP_REQUIRES_UNIFIED_SHARED_MEMORY = GOMP_REQUIRES_UNIFIED_SHARED_MEMORY,
OMP_REQUIRES_DYNAMIC_ALLOCATORS = 0x40,
- OMP_REQUIRES_REVERSE_OFFLOAD = 0x80,
+ OMP_REQUIRES_REVERSE_OFFLOAD = GOMP_REQUIRES_REVERSE_OFFLOAD,
OMP_REQUIRES_ATOMIC_DEFAULT_MEM_ORDER_USED = 0x100,
- OMP_REQUIRES_TARGET_USED = 0x200
+ OMP_REQUIRES_TARGET_USED = GOMP_REQUIRES_TARGET_USED,
};
extern GTY(()) enum omp_requires omp_requires_mask;
diff --git a/include/gomp-constants.h b/include/gomp-constants.h
index 3e3078f082e..84316f953d0 100644
--- a/include/gomp-constants.h
+++ b/include/gomp-constants.h
@@ -341,8 +341,7 @@ enum gomp_map_kind
#define GOMP_DEPEND_MUTEXINOUTSET 4
#define GOMP_DEPEND_INOUTSET 5
-/* Flag values for requires-directive features, must match corresponding
- OMP_REQUIRES_* values in gcc/omp-general.h. */
+/* Flag values for OpenMP 'requires' directive features. */
#define GOMP_REQUIRES_UNIFIED_ADDRESS 0x10
#define GOMP_REQUIRES_UNIFIED_SHARED_MEMORY 0x20
#define GOMP_REQUIRES_REVERSE_OFFLOAD 0x80
--
2.35.1
next prev parent reply other threads:[~2022-07-06 10:31 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 15:07 [PATCH, OpenMP 5.0] More implementation of the requires directive Chung-Lin Tang
2021-01-13 15:27 ` Jakub Jelinek
2021-03-25 11:18 ` Thomas Schwinge
2022-03-29 13:42 ` Andrew Stubbs
2022-06-08 3:56 ` [Patch] OpenMP: Move omp requires checks to libgomp Tobias Burnus
2022-06-09 11:40 ` Jakub Jelinek
2022-06-09 12:46 ` Tobias Burnus
2022-06-09 14:19 ` Jakub Jelinek
2022-06-29 14:33 ` [Patch][v4] " Tobias Burnus
2022-06-29 17:02 ` Jakub Jelinek
2022-06-29 18:10 ` Tobias Burnus
2022-06-29 20:18 ` Jakub Jelinek
2022-07-01 13:06 ` [Patch][v5] " Tobias Burnus
2022-07-01 14:34 ` Jakub Jelinek
2022-07-01 16:31 ` Tobias Burnus
2022-07-01 16:55 ` Jakub Jelinek
2022-07-01 21:08 ` Tobias Burnus
2022-07-04 8:31 ` Jakub Jelinek
2022-07-07 13:26 ` Fix one issue in OpenMP 'requires' directive diagnostics (was: [Patch][v5] OpenMP: Move omp requires checks to libgomp) Thomas Schwinge
2022-07-07 13:56 ` Tobias Burnus
2022-07-08 6:59 ` Thomas Schwinge
2022-07-06 10:42 ` Restore 'GOMP_offload_unregister_ver' functionality " Thomas Schwinge
2022-07-06 13:59 ` Tobias Burnus
2022-07-06 21:08 ` Thomas Schwinge
2022-08-17 11:45 ` Jakub Jelinek
2023-09-15 9:41 ` [Patch][v5] OpenMP: Move omp requires checks to libgomp Thomas Schwinge
2022-07-07 8:37 ` Adjust 'libgomp.c-c++-common/requires-3.c' (was: [Patch][v4] OpenMP: Move omp requires checks to libgomp) Thomas Schwinge
2022-07-07 9:02 ` Tobias Burnus
2022-07-07 8:42 ` Enhance 'libgomp.c-c++-common/requires-4.c', 'libgomp.c-c++-common/requires-5.c' testing " Thomas Schwinge
2022-07-07 9:36 ` Tobias Burnus
2022-07-07 10:42 ` Thomas Schwinge
2022-07-06 10:30 ` Thomas Schwinge [this message]
2022-07-06 13:40 ` Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place (was: [Patch] " Tobias Burnus
2022-07-06 11:04 ` Fix Intel MIC 'mkoffload' for OpenMP 'requires' " Thomas Schwinge
2022-07-06 11:29 ` Tobias Burnus
2022-07-06 12:38 ` Thomas Schwinge
2022-07-06 13:30 ` Tobias Burnus
2022-07-07 10:46 ` Thomas Schwinge
2022-07-06 14:19 ` Tobias Burnus
2024-03-07 12:38 ` nvptx: 'cuDeviceGetCount' failure is fatal " Thomas Schwinge
2024-03-07 14:28 ` nvptx: 'cuDeviceGetCount' failure is fatal Tobias Burnus
2024-03-08 15:58 ` 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=87wncq4joo.fsf@euler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=tobias@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).