Hi Thomas,
On 06.07.22 12:30, Thomas Schwinge wrote:
On 2022-06-08T05:56:02+0200, Tobias Burnus <tobias_bur...@mentor.com>
wrote:
[..]
To make things more failure proof, OK to push the attached
"Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place"?
I concur that it makes sense to avoid having multiple definitions,
especially as I can imagine that we might want to use this flag to
pass other options to the library - e.g. some of the command-line
pinning flags, proposed (and used in the OG11/OG12 branch).
Thus, the following is ok/makes sense from my point of view.
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
Tobias
-----------------
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