[OpenMP] Update allocator trait key/value definitions

Use new definitions introduced in 5.1 specification.

Differential Revision: https://reviews.llvm.org/D94277
This commit is contained in:
Hansang Bae 2021-01-07 10:14:21 -06:00
parent 6529d7c5a4
commit 6f0f022038
5 changed files with 19 additions and 14 deletions

View File

@ -307,7 +307,7 @@
typedef uintptr_t omp_uintptr_t;
typedef enum {
omp_atk_threadmodel = 1,
omp_atk_sync_hint = 1,
omp_atk_alignment = 2,
omp_atk_access = 3,
omp_atk_pool_size = 4,
@ -320,10 +320,10 @@
typedef enum {
omp_atv_false = 0,
omp_atv_true = 1,
omp_atv_default = 2,
omp_atv_contended = 3,
omp_atv_uncontended = 4,
omp_atv_sequential = 5,
omp_atv_serialized = 5,
omp_atv_sequential = omp_atv_serialized, // (deprecated)
omp_atv_private = 6,
omp_atv_all = 7,
omp_atv_thread = 8,
@ -338,6 +338,7 @@
omp_atv_blocked = 17,
omp_atv_interleaved = 18
} omp_alloctrait_value_t;
#define omp_atv_default ((omp_uintptr_t)-1)
typedef struct {
omp_alloctrait_key_t key;

View File

@ -98,7 +98,7 @@
integer (kind=omp_control_tool_result_kind), parameter :: omp_control_tool_success = 0
integer (kind=omp_control_tool_result_kind), parameter :: omp_control_tool_ignored = 1
integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_threadmodel = 1
integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_sync_hint = 1
integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_alignment = 2
integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_access = 3
integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_pool_size = 4
@ -107,12 +107,13 @@
integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_pinned = 7
integer (kind=omp_alloctrait_key_kind), parameter :: omp_atk_partition = 8
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_default = -1
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_false = 0
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_true = 1
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_default = 2
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_contended = 3
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_uncontended = 4
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_sequential = 5
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_serialized = 5
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_sequential = omp_atv_serialized
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_private = 6
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_all = 7
integer (kind=omp_alloctrait_val_kind), parameter :: omp_atv_thread = 8

View File

@ -131,8 +131,8 @@
integer(omp_control_tool_result_kind)omp_control_tool_ignored
parameter(omp_control_tool_ignored=1)
integer(kind=omp_alloctrait_key_kind)omp_atk_threadmodel
parameter(omp_atk_threadmodel=1)
integer(kind=omp_alloctrait_key_kind)omp_atk_sync_hint
parameter(omp_atk_sync_hint=1)
integer(kind=omp_alloctrait_key_kind)omp_atk_alignment
parameter(omp_atk_alignment=2)
integer(kind=omp_alloctrait_key_kind)omp_atk_access
@ -148,18 +148,20 @@
integer(kind=omp_alloctrait_key_kind)omp_atk_partition
parameter(omp_atk_partition=8)
integer(kind=omp_alloctrait_val_kind)omp_atv_default
parameter(omp_atv_default=-1)
! Reserved for future use
integer(kind=omp_alloctrait_val_kind)omp_atv_false
parameter(omp_atv_false=0)
! Reserved for future use
integer(kind=omp_alloctrait_val_kind)omp_atv_true
parameter(omp_atv_true=1)
integer(kind=omp_alloctrait_val_kind)omp_atv_default
parameter(omp_atv_default=2)
integer(kind=omp_alloctrait_val_kind)omp_atv_contended
parameter(omp_atv_contended=3)
integer(kind=omp_alloctrait_val_kind)omp_atv_uncontended
parameter(omp_atv_uncontended=4)
integer(kind=omp_alloctrait_val_kind)omp_atv_serialized
parameter(omp_atv_serialized=5)
integer(kind=omp_alloctrait_val_kind)omp_atv_sequential
parameter(omp_atv_sequential=5)
integer(kind=omp_alloctrait_val_kind)omp_atv_private

View File

@ -890,7 +890,7 @@ extern int __kmp_hws_abs_flag; // absolute or per-item number requested
typedef uintptr_t omp_uintptr_t;
typedef enum {
omp_atk_threadmodel = 1,
omp_atk_sync_hint = 1,
omp_atk_alignment = 2,
omp_atk_access = 3,
omp_atk_pool_size = 4,
@ -903,10 +903,10 @@ typedef enum {
typedef enum {
omp_atv_false = 0,
omp_atv_true = 1,
omp_atv_default = 2,
omp_atv_contended = 3,
omp_atv_uncontended = 4,
omp_atv_sequential = 5,
omp_atv_serialized = 5,
omp_atv_sequential = omp_atv_serialized, // (deprecated)
omp_atv_private = 6,
omp_atv_all = 7,
omp_atv_thread = 8,
@ -921,6 +921,7 @@ typedef enum {
omp_atv_blocked = 17,
omp_atv_interleaved = 18
} omp_alloctrait_value_t;
#define omp_atv_default ((omp_uintptr_t)-1)
typedef void *omp_memspace_handle_t;
extern omp_memspace_handle_t const omp_default_mem_space;

View File

@ -1348,7 +1348,7 @@ omp_allocator_handle_t __kmpc_init_allocator(int gtid, omp_memspace_handle_t ms,
al->memspace = ms; // not used currently
for (i = 0; i < ntraits; ++i) {
switch (traits[i].key) {
case omp_atk_threadmodel:
case omp_atk_sync_hint:
case omp_atk_access:
case omp_atk_pinned:
break;