1//===--- OMPKinds.def - OpenMP directives, clauses, rt-calls -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8/// \file
9///
10/// This file defines the list of supported OpenMP runtime
11/// calls, and other things that need to be listed in enums.
12///
13/// This file is under transition to OMP.td with TableGen code generation.
14///
15//===----------------------------------------------------------------------===//
16
17/// OpenMP Directives, combined directives and Clauses
18/// - Moved to OMP.td
19
20/// Types used in runtime structs or runtime functions
21///
22///{
23
24#ifndef OMP_TYPE
25#define OMP_TYPE(VarName, InitValue)
26#endif
27
28#define __OMP_TYPE(VarName) OMP_TYPE(VarName, Type::get##VarName##Ty(Ctx))
29
30__OMP_TYPE(Void)
31__OMP_TYPE(Int1)
32__OMP_TYPE(Int8)
33__OMP_TYPE(Int16)
34__OMP_TYPE(Int32)
35__OMP_TYPE(Int64)
36__OMP_TYPE(Int8Ptr)
37__OMP_TYPE(Int16Ptr)
38__OMP_TYPE(Int32Ptr)
39__OMP_TYPE(Int64Ptr)
40__OMP_TYPE(Double)
41
42OMP_TYPE(SizeTy, M.getDataLayout().getIntPtrType(Ctx))
43OMP_TYPE(Int63, Type::getIntNTy(Ctx, 63))
44
45#define __OMP_PTR_TYPE(NAME, BASE) OMP_TYPE(NAME, BASE->getPointerTo())
46
47__OMP_PTR_TYPE(VoidPtr, Int8)
48__OMP_PTR_TYPE(VoidPtrPtr, VoidPtr)
49__OMP_PTR_TYPE(VoidPtrPtrPtr, VoidPtrPtr)
50
51__OMP_PTR_TYPE(Int8PtrPtr, Int8Ptr)
52__OMP_PTR_TYPE(Int8PtrPtrPtr, Int8PtrPtr)
53
54#undef __OMP_PTR_TYPE
55
56#undef __OMP_TYPE
57#undef OMP_TYPE
58
59///}
60
61/// array types
62///
63///{
64
65#ifndef OMP_ARRAY_TYPE
66#define OMP_ARRAY_TYPE(VarName, ElemTy, ArraySize)
67#endif
68
69#define __OMP_ARRAY_TYPE(VarName, ElemTy, ArraySize) \
70 OMP_ARRAY_TYPE(VarName, ElemTy, ArraySize)
71
72__OMP_ARRAY_TYPE(KmpCriticalName, Int32, 8)
73__OMP_ARRAY_TYPE(Int32Arr3, Int32, 3)
74
75#undef __OMP_ARRAY_TYPE
76#undef OMP_ARRAY_TYPE
77
78///}
79
80/// Struct and function types
81///
82///{
83
84#ifndef OMP_STRUCT_TYPE
85#define OMP_STRUCT_TYPE(VarName, StructName, Packed, ...)
86#endif
87
88#define __OMP_STRUCT_TYPE(VarName, Name, Packed, ...) \
89 OMP_STRUCT_TYPE(VarName, "struct." #Name, Packed, __VA_ARGS__)
90
91__OMP_STRUCT_TYPE(Ident, ident_t, false, Int32, Int32, Int32, Int32, Int8Ptr)
92__OMP_STRUCT_TYPE(OffloadEntry, __tgt_offload_entry, false, Int8Ptr, Int8Ptr, SizeTy,
93 Int32, Int32)
94__OMP_STRUCT_TYPE(KernelArgs, __tgt_kernel_arguments, false, Int32, Int32, VoidPtrPtr,
95 VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr,
96 Int64, Int64, Int32Arr3Ty, Int32Arr3Ty, Int32)
97__OMP_STRUCT_TYPE(AsyncInfo, __tgt_async_info, false, Int8Ptr)
98__OMP_STRUCT_TYPE(DependInfo, kmp_dep_info, false, SizeTy, SizeTy, Int8)
99
100#undef __OMP_STRUCT_TYPE
101#undef OMP_STRUCT_TYPE
102
103#ifndef OMP_FUNCTION_TYPE
104#define OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, ...)
105#endif
106
107#define __OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, ...) \
108 OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, __VA_ARGS__)
109
110__OMP_FUNCTION_TYPE(ParallelTask, true, Void, Int32Ptr, Int32Ptr)
111__OMP_FUNCTION_TYPE(ReduceFunction, false, Void, VoidPtr, VoidPtr)
112__OMP_FUNCTION_TYPE(CopyFunction, false, Void, VoidPtr, VoidPtr)
113__OMP_FUNCTION_TYPE(KmpcCtor, false, VoidPtr, VoidPtr)
114__OMP_FUNCTION_TYPE(KmpcDtor, false, Void, VoidPtr)
115__OMP_FUNCTION_TYPE(KmpcCopyCtor, false, VoidPtr, VoidPtr, VoidPtr)
116__OMP_FUNCTION_TYPE(TaskRoutineEntry, false, Int32, Int32,
117 /* kmp_task_t */ VoidPtr)
118__OMP_FUNCTION_TYPE(ShuffleReduce, false, Void, VoidPtr, Int16, Int16, Int16)
119__OMP_FUNCTION_TYPE(InterWarpCopy, false, Void, VoidPtr, Int32)
120__OMP_FUNCTION_TYPE(GlobalList, false, Void, VoidPtr, Int32, VoidPtr)
121
122#undef __OMP_FUNCTION_TYPE
123#undef OMP_FUNCTION_TYPE
124
125///}
126
127/// Internal Control Variables information
128///
129///{
130
131#ifndef ICV_INIT_VALUE
132#define ICV_INIT_VALUE(Enum, Name)
133#endif
134
135#define __ICV_INIT_VALUE(Name) ICV_INIT_VALUE(ICV_##Name, #Name)
136
137__ICV_INIT_VALUE(ZERO)
138__ICV_INIT_VALUE(FALSE)
139__ICV_INIT_VALUE(IMPLEMENTATION_DEFINED)
140__ICV_INIT_VALUE(LAST)
141
142#undef __ICV_INIT_VALUE
143#undef ICV_INIT_VALUE
144
145#ifndef ICV_DATA_ENV
146#define ICV_DATA_ENV(Enum, Name, EnvVarName, Init)
147#endif
148
149#define __ICV_DATA_ENV(Name, EnvVarName, Init) \
150 ICV_DATA_ENV(ICV_##Name, #Name, #EnvVarName, Init)
151
152__ICV_DATA_ENV(nthreads, OMP_NUM_THREADS, ICV_IMPLEMENTATION_DEFINED)
153__ICV_DATA_ENV(active_levels, NONE, ICV_ZERO)
154__ICV_DATA_ENV(cancel, OMP_CANCELLATION, ICV_FALSE)
155__ICV_DATA_ENV(proc_bind, OMP_PROC_BIND, ICV_IMPLEMENTATION_DEFINED)
156__ICV_DATA_ENV(__last, last, ICV_LAST)
157
158#undef __ICV_DATA_ENV
159#undef ICV_DATA_ENV
160
161#ifndef ICV_RT_SET
162#define ICV_RT_SET(Name, RTL)
163#endif
164
165#define __ICV_RT_SET(Name, RTL) ICV_RT_SET(ICV_##Name, OMPRTL_##RTL)
166
167__ICV_RT_SET(nthreads, omp_set_num_threads)
168
169#undef __ICV_RT_SET
170#undef ICV_RT_SET
171
172#ifndef ICV_RT_GET
173#define ICV_RT_GET(Name, RTL)
174#endif
175
176#define __ICV_RT_GET(Name, RTL) ICV_RT_GET(ICV_##Name, OMPRTL_##RTL)
177
178__ICV_RT_GET(nthreads, omp_get_max_threads)
179__ICV_RT_GET(active_levels, omp_get_active_level)
180__ICV_RT_GET(cancel, omp_get_cancellation)
181__ICV_RT_GET(proc_bind, omp_get_proc_bind)
182
183#undef __ICV_RT_GET
184#undef ICV_RT_GET
185
186///}
187
188/// Runtime library function (and their attributes)
189///
190///{
191
192#ifndef OMP_RTL
193#define OMP_RTL(Enum, Str, IsVarArg, ReturnType, ...)
194#endif
195
196#define __OMP_RTL(Name, IsVarArg, ReturnType, ...) \
197 OMP_RTL(OMPRTL_##Name, #Name, IsVarArg, ReturnType, __VA_ARGS__)
198
199
200
201__OMP_RTL(__kmpc_barrier, false, Void, IdentPtr, Int32)
202__OMP_RTL(__kmpc_cancel, false, Int32, IdentPtr, Int32, Int32)
203__OMP_RTL(__kmpc_cancel_barrier, false, Int32, IdentPtr, Int32)
204__OMP_RTL(__kmpc_error, false, Void, IdentPtr, Int32, Int8Ptr)
205__OMP_RTL(__kmpc_flush, false, Void, IdentPtr)
206__OMP_RTL(__kmpc_global_thread_num, false, Int32, IdentPtr)
207__OMP_RTL(__kmpc_get_hardware_thread_id_in_block, false, Int32, )
208__OMP_RTL(__kmpc_fork_call, true, Void, IdentPtr, Int32, ParallelTaskPtr)
209__OMP_RTL(__kmpc_fork_call_if, false, Void, IdentPtr, Int32, ParallelTaskPtr,
210 Int32, VoidPtr)
211__OMP_RTL(__kmpc_omp_taskwait, false, Int32, IdentPtr, Int32)
212__OMP_RTL(__kmpc_omp_taskyield, false, Int32, IdentPtr, Int32, /* Int */ Int32)
213__OMP_RTL(__kmpc_push_num_threads, false, Void, IdentPtr, Int32,
214 /* Int */ Int32)
215__OMP_RTL(__kmpc_push_proc_bind, false, Void, IdentPtr, Int32, /* Int */ Int32)
216__OMP_RTL(__kmpc_omp_reg_task_with_affinity, false, Int32, IdentPtr, Int32,
217 /* kmp_task_t */ VoidPtr, Int32,
218 /* kmp_task_affinity_info_t */ VoidPtr)
219
220__OMP_RTL(__kmpc_get_hardware_num_blocks, false, Int32, )
221__OMP_RTL(__kmpc_get_hardware_num_threads_in_block, false, Int32, )
222__OMP_RTL(__kmpc_get_warp_size, false, Int32, )
223
224__OMP_RTL(omp_get_thread_num, false, Int32, )
225__OMP_RTL(omp_get_num_threads, false, Int32, )
226__OMP_RTL(omp_get_max_threads, false, Int32, )
227__OMP_RTL(omp_in_parallel, false, Int32, )
228__OMP_RTL(omp_get_dynamic, false, Int32, )
229__OMP_RTL(omp_get_cancellation, false, Int32, )
230__OMP_RTL(omp_get_nested, false, Int32, )
231__OMP_RTL(omp_get_schedule, false, Void, Int32Ptr, Int32Ptr)
232__OMP_RTL(omp_get_thread_limit, false, Int32, )
233__OMP_RTL(omp_get_supported_active_levels, false, Int32, )
234__OMP_RTL(omp_get_max_active_levels, false, Int32, )
235__OMP_RTL(omp_get_level, false, Int32, )
236__OMP_RTL(omp_get_ancestor_thread_num, false, Int32, Int32)
237__OMP_RTL(omp_get_team_size, false, Int32, Int32)
238__OMP_RTL(omp_get_active_level, false, Int32, )
239__OMP_RTL(omp_in_final, false, Int32, )
240__OMP_RTL(omp_get_proc_bind, false, Int32, )
241__OMP_RTL(omp_get_num_places, false, Int32, )
242__OMP_RTL(omp_get_num_procs, false, Int32, )
243__OMP_RTL(omp_get_place_proc_ids, false, Void, Int32, Int32Ptr)
244__OMP_RTL(omp_get_place_num, false, Int32, )
245__OMP_RTL(omp_get_partition_num_places, false, Int32, )
246__OMP_RTL(omp_get_partition_place_nums, false, Void, Int32Ptr)
247__OMP_RTL(omp_get_wtime, false, Double,)
248
249__OMP_RTL(omp_set_num_threads, false, Void, Int32)
250__OMP_RTL(omp_set_dynamic, false, Void, Int32)
251__OMP_RTL(omp_set_nested, false, Void, Int32)
252__OMP_RTL(omp_set_schedule, false, Void, Int32, Int32)
253__OMP_RTL(omp_set_max_active_levels, false, Void, Int32)
254
255__OMP_RTL(__kmpc_master, false, Int32, IdentPtr, Int32)
256__OMP_RTL(__kmpc_end_master, false, Void, IdentPtr, Int32)
257__OMP_RTL(__kmpc_masked, false, Int32, IdentPtr, Int32, Int32)
258__OMP_RTL(__kmpc_end_masked, false, Void, IdentPtr, Int32)
259__OMP_RTL(__kmpc_critical, false, Void, IdentPtr, Int32, KmpCriticalNamePtrTy)
260__OMP_RTL(__kmpc_critical_with_hint, false, Void, IdentPtr, Int32,
261 KmpCriticalNamePtrTy, Int32)
262__OMP_RTL(__kmpc_end_critical, false, Void, IdentPtr, Int32,
263 KmpCriticalNamePtrTy)
264
265__OMP_RTL(__kmpc_begin, false, Void, IdentPtr, Int32)
266__OMP_RTL(__kmpc_end, false, Void, IdentPtr)
267
268__OMP_RTL(__kmpc_reduce, false, Int32, IdentPtr, Int32, Int32, SizeTy, VoidPtr,
269 ReduceFunctionPtr, KmpCriticalNamePtrTy)
270__OMP_RTL(__kmpc_reduce_nowait, false, Int32, IdentPtr, Int32, Int32, SizeTy,
271 VoidPtr, ReduceFunctionPtr, KmpCriticalNamePtrTy)
272__OMP_RTL(__kmpc_end_reduce, false, Void, IdentPtr, Int32, KmpCriticalNamePtrTy)
273__OMP_RTL(__kmpc_end_reduce_nowait, false, Void, IdentPtr, Int32,
274 KmpCriticalNamePtrTy)
275
276__OMP_RTL(__kmpc_ordered, false, Void, IdentPtr, Int32)
277__OMP_RTL(__kmpc_end_ordered, false, Void, IdentPtr, Int32)
278
279__OMP_RTL(__kmpc_for_static_init_4, false, Void, IdentPtr, Int32, Int32,
280 Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
281__OMP_RTL(__kmpc_for_static_init_4u, false, Void, IdentPtr, Int32, Int32,
282 Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
283__OMP_RTL(__kmpc_for_static_init_8, false, Void, IdentPtr, Int32, Int32,
284 Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
285__OMP_RTL(__kmpc_for_static_init_8u, false, Void, IdentPtr, Int32, Int32,
286 Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
287__OMP_RTL(__kmpc_for_static_fini, false, Void, IdentPtr, Int32)
288__OMP_RTL(__kmpc_distribute_static_init_4, false, Void, IdentPtr, Int32, Int32,
289 Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
290__OMP_RTL(__kmpc_distribute_static_init_4u, false, Void, IdentPtr, Int32, Int32,
291 Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
292__OMP_RTL(__kmpc_distribute_static_init_8, false, Void, IdentPtr, Int32, Int32,
293 Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
294__OMP_RTL(__kmpc_distribute_static_init_8u, false, Void, IdentPtr, Int32, Int32,
295 Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
296__OMP_RTL(__kmpc_distribute_static_fini, false, Void, IdentPtr, Int32)
297__OMP_RTL(__kmpc_dist_dispatch_init_4, false, Void, IdentPtr, Int32, Int32,
298 Int32Ptr, Int32, Int32, Int32, Int32)
299__OMP_RTL(__kmpc_dist_dispatch_init_4u, false, Void, IdentPtr, Int32, Int32,
300 Int32Ptr, Int32, Int32, Int32, Int32)
301__OMP_RTL(__kmpc_dist_dispatch_init_8, false, Void, IdentPtr, Int32, Int32,
302 Int32Ptr, Int64, Int64, Int64, Int64)
303__OMP_RTL(__kmpc_dist_dispatch_init_8u, false, Void, IdentPtr, Int32, Int32,
304 Int32Ptr, Int64, Int64, Int64, Int64)
305__OMP_RTL(__kmpc_dispatch_init_4, false, Void, IdentPtr, Int32, Int32, Int32,
306 Int32, Int32, Int32)
307__OMP_RTL(__kmpc_dispatch_init_4u, false, Void, IdentPtr, Int32, Int32, Int32,
308 Int32, Int32, Int32)
309__OMP_RTL(__kmpc_dispatch_init_8, false, Void, IdentPtr, Int32, Int32, Int64,
310 Int64, Int64, Int64)
311__OMP_RTL(__kmpc_dispatch_init_8u, false, Void, IdentPtr, Int32, Int32, Int64,
312 Int64, Int64, Int64)
313__OMP_RTL(__kmpc_dispatch_next_4, false, Int32, IdentPtr, Int32, Int32Ptr,
314 Int32Ptr, Int32Ptr, Int32Ptr)
315__OMP_RTL(__kmpc_dispatch_next_4u, false, Int32, IdentPtr, Int32, Int32Ptr,
316 Int32Ptr, Int32Ptr, Int32Ptr)
317__OMP_RTL(__kmpc_dispatch_next_8, false, Int32, IdentPtr, Int32, Int32Ptr,
318 Int64Ptr, Int64Ptr, Int64Ptr)
319__OMP_RTL(__kmpc_dispatch_next_8u, false, Int32, IdentPtr, Int32, Int32Ptr,
320 Int64Ptr, Int64Ptr, Int64Ptr)
321__OMP_RTL(__kmpc_dispatch_fini_4, false, Void, IdentPtr, Int32)
322__OMP_RTL(__kmpc_dispatch_fini_4u, false, Void, IdentPtr, Int32)
323__OMP_RTL(__kmpc_dispatch_fini_8, false, Void, IdentPtr, Int32)
324__OMP_RTL(__kmpc_dispatch_fini_8u, false, Void, IdentPtr, Int32)
325__OMP_RTL(__kmpc_team_static_init_4, false, Void, IdentPtr, Int32, Int32Ptr,
326 Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
327__OMP_RTL(__kmpc_team_static_init_4u, false, Void, IdentPtr, Int32, Int32Ptr,
328 Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
329__OMP_RTL(__kmpc_team_static_init_8, false, Void, IdentPtr, Int32, Int32Ptr,
330 Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
331__OMP_RTL(__kmpc_team_static_init_8u, false, Void, IdentPtr, Int32, Int32Ptr,
332 Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
333__OMP_RTL(__kmpc_dist_for_static_init_4, false, Void, IdentPtr, Int32, Int32,
334 Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
335__OMP_RTL(__kmpc_dist_for_static_init_4u, false, Void, IdentPtr, Int32, Int32,
336 Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
337__OMP_RTL(__kmpc_dist_for_static_init_8, false, Void, IdentPtr, Int32, Int32,
338 Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
339__OMP_RTL(__kmpc_dist_for_static_init_8u, false, Void, IdentPtr, Int32, Int32,
340 Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
341
342__OMP_RTL(__kmpc_single, false, Int32, IdentPtr, Int32)
343__OMP_RTL(__kmpc_end_single, false, Void, IdentPtr, Int32)
344
345__OMP_RTL(__kmpc_omp_task_alloc, false, /* kmp_task_t */ VoidPtr, IdentPtr,
346 Int32, Int32, SizeTy, SizeTy, TaskRoutineEntryPtr)
347__OMP_RTL(__kmpc_omp_task, false, Int32, IdentPtr, Int32,
348 /* kmp_task_t */ VoidPtr)
349__OMP_RTL(__kmpc_end_taskgroup, false, Void, IdentPtr, Int32)
350__OMP_RTL(__kmpc_taskgroup, false, Void, IdentPtr, Int32)
351__OMP_RTL(__kmpc_omp_task_begin_if0, false, Void, IdentPtr, Int32,
352 /* kmp_task_t */ VoidPtr)
353__OMP_RTL(__kmpc_omp_task_complete_if0, false, Void, IdentPtr, Int32,
354 /* kmp_tasK_t */ VoidPtr)
355__OMP_RTL(__kmpc_omp_task_with_deps, false, Int32, IdentPtr, Int32,
356 /* kmp_task_t */ VoidPtr, Int32,
357 /* kmp_depend_info_t */ VoidPtr, Int32,
358 /* kmp_depend_info_t */ VoidPtr)
359__OMP_RTL(__kmpc_taskloop, false, Void, IdentPtr, /* Int */ Int32, VoidPtr,
360 /* Int */ Int32, Int64Ptr, Int64Ptr, Int64, /* Int */ Int32,
361 /* Int */ Int32, Int64, VoidPtr)
362__OMP_RTL(__kmpc_omp_target_task_alloc, false, /* kmp_task_t */ VoidPtr,
363 IdentPtr, Int32, Int32, SizeTy, SizeTy, TaskRoutineEntryPtr, Int64)
364__OMP_RTL(__kmpc_taskred_modifier_init, false, /* kmp_taskgroup */ VoidPtr,
365 IdentPtr, /* Int */ Int32, /* Int */ Int32, /* Int */ Int32, VoidPtr)
366__OMP_RTL(__kmpc_taskred_init, false, /* kmp_taskgroup */ VoidPtr,
367 /* Int */ Int32, /* Int */ Int32, VoidPtr)
368__OMP_RTL(__kmpc_task_reduction_modifier_fini, false, Void, IdentPtr,
369 /* Int */ Int32, /* Int */ Int32)
370__OMP_RTL(__kmpc_task_reduction_get_th_data, false, VoidPtr, Int32, VoidPtr,
371 VoidPtr)
372__OMP_RTL(__kmpc_task_reduction_init, false, VoidPtr, Int32, Int32, VoidPtr)
373__OMP_RTL(__kmpc_task_reduction_modifier_init, false, VoidPtr, VoidPtr, Int32,
374 Int32, Int32, VoidPtr)
375__OMP_RTL(__kmpc_proxy_task_completed_ooo, false, Void, VoidPtr)
376
377__OMP_RTL(__kmpc_omp_wait_deps, false, Void, IdentPtr, Int32, Int32,
378 /* kmp_depend_info_t */ VoidPtr, Int32, VoidPtr)
379__OMP_RTL(__kmpc_omp_taskwait_deps_51, false, Void, IdentPtr, Int32, Int32,
380 /* kmp_depend_info_t */ VoidPtr, Int32, VoidPtr, Int32)
381__OMP_RTL(__kmpc_cancellationpoint, false, Int32, IdentPtr, Int32, Int32)
382
383__OMP_RTL(__kmpc_fork_teams, true, Void, IdentPtr, Int32, ParallelTaskPtr)
384__OMP_RTL(__kmpc_push_num_teams, false, Void, IdentPtr, Int32, Int32, Int32)
385
386__OMP_RTL(__kmpc_copyprivate, false, Void, IdentPtr, Int32, SizeTy, VoidPtr,
387 CopyFunctionPtr, Int32)
388__OMP_RTL(__kmpc_threadprivate_cached, false, VoidPtr, IdentPtr, Int32, VoidPtr,
389 SizeTy, VoidPtrPtrPtr)
390__OMP_RTL(__kmpc_threadprivate_register, false, Void, IdentPtr, VoidPtr,
391 KmpcCtorPtr, KmpcCopyCtorPtr, KmpcDtorPtr)
392
393__OMP_RTL(__kmpc_doacross_init, false, Void, IdentPtr, Int32, Int32,
394 /* kmp_dim */ VoidPtr)
395__OMP_RTL(__kmpc_doacross_post, false, Void, IdentPtr, Int32, Int64Ptr)
396__OMP_RTL(__kmpc_doacross_wait, false, Void, IdentPtr, Int32, Int64Ptr)
397__OMP_RTL(__kmpc_doacross_fini, false, Void, IdentPtr, Int32)
398
399__OMP_RTL(__kmpc_alloc, false, VoidPtr, /* Int */ Int32, SizeTy, VoidPtr)
400__OMP_RTL(__kmpc_aligned_alloc, false, VoidPtr, /* Int */ Int32, SizeTy, SizeTy,
401 VoidPtr)
402__OMP_RTL(__kmpc_free, false, Void, /* Int */ Int32, VoidPtr, VoidPtr)
403
404__OMP_RTL(__tgt_interop_init, false, Void, IdentPtr, Int32, VoidPtrPtr, Int32,
405 Int32, Int32, VoidPtr, Int32)
406__OMP_RTL(__tgt_interop_destroy, false, Void, IdentPtr, Int32, VoidPtrPtr,
407 Int32, Int32, VoidPtr, Int32)
408__OMP_RTL(__tgt_interop_use, false, Void, IdentPtr, Int32, VoidPtrPtr, Int32,
409 Int32, VoidPtr, Int32)
410
411__OMP_RTL(__kmpc_init_allocator, false, /* omp_allocator_handle_t */ VoidPtr,
412 /* Int */ Int32, /* omp_memespace_handle_t */ VoidPtr,
413 /* Int */ Int32, /* omp_alloctrait_t */ VoidPtr)
414__OMP_RTL(__kmpc_destroy_allocator, false, Void, /* Int */ Int32,
415 /* omp_allocator_handle_t */ VoidPtr)
416
417__OMP_RTL(__kmpc_push_target_tripcount_mapper, false, Void, IdentPtr, Int64, Int64)
418__OMP_RTL(__tgt_target_mapper, false, Int32, IdentPtr, Int64, VoidPtr, Int32, VoidPtrPtr,
419 VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
420__OMP_RTL(__tgt_target_nowait_mapper, false, Int32, IdentPtr, Int64, VoidPtr,
421 Int32, VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr,
422 VoidPtrPtr, Int32, VoidPtr, Int32, VoidPtr)
423__OMP_RTL(__tgt_target_teams_mapper, false, Int32, IdentPtr, Int64, VoidPtr, Int32,
424 VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr, Int32, Int32)
425__OMP_RTL(__tgt_target_teams_nowait_mapper, false, Int32, IdentPtr, Int64,
426 VoidPtr, Int32, VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr,
427 VoidPtrPtr, VoidPtrPtr, Int32, Int32, Int32, VoidPtr, Int32, VoidPtr)
428__OMP_RTL(__tgt_target_kernel, false, Int32, IdentPtr, Int64, Int32, Int32,
429 VoidPtr, KernelArgsPtr)
430__OMP_RTL(__tgt_target_kernel_nowait, false, Int32, IdentPtr, Int64, Int32,
431 Int32, VoidPtr, KernelArgsPtr, Int32, VoidPtr, Int32, VoidPtr)
432__OMP_RTL(__tgt_register_requires, false, Void, Int64)
433__OMP_RTL(__tgt_target_data_begin_mapper, false, Void, IdentPtr, Int64, Int32, VoidPtrPtr,
434 VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
435__OMP_RTL(__tgt_target_data_begin_nowait_mapper, false, Void, IdentPtr, Int64, Int32,
436 VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
437__OMP_RTL(__tgt_target_data_begin_mapper_issue, false, Void, IdentPtr, Int64, Int32,
438 VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr, AsyncInfoPtr)
439__OMP_RTL(__tgt_target_data_begin_mapper_wait, false, Void, Int64, AsyncInfoPtr)
440__OMP_RTL(__tgt_target_data_end_mapper, false, Void, IdentPtr, Int64, Int32, VoidPtrPtr,
441 VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
442__OMP_RTL(__tgt_target_data_end_nowait_mapper, false, Void, IdentPtr, Int64, Int32,
443 VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
444__OMP_RTL(__tgt_target_data_update_mapper, false, Void, IdentPtr, Int64, Int32,
445 VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
446__OMP_RTL(__tgt_target_data_update_nowait_mapper, false, Void, IdentPtr, Int64, Int32,
447 VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
448__OMP_RTL(__tgt_mapper_num_components, false, Int64, VoidPtr)
449__OMP_RTL(__tgt_push_mapper_component, false, Void, VoidPtr, VoidPtr, VoidPtr,
450 Int64, Int64, VoidPtr)
451__OMP_RTL(__kmpc_task_allow_completion_event, false, VoidPtr, IdentPtr,
452 /* Int */ Int32, /* kmp_task_t */ VoidPtr)
453
454/// OpenMP Device runtime functions
455__OMP_RTL(__kmpc_target_init, false, Int32, IdentPtr, Int8, Int1)
456__OMP_RTL(__kmpc_target_deinit, false, Void, IdentPtr, Int8)
457__OMP_RTL(__kmpc_kernel_prepare_parallel, false, Void, VoidPtr)
458__OMP_RTL(__kmpc_parallel_51, false, Void, IdentPtr, Int32, Int32, Int32, Int32,
459 VoidPtr, VoidPtr, VoidPtrPtr, SizeTy)
460__OMP_RTL(__kmpc_kernel_parallel, false, Int1, VoidPtrPtr)
461__OMP_RTL(__kmpc_kernel_end_parallel, false, Void, )
462__OMP_RTL(__kmpc_serialized_parallel, false, Void, IdentPtr, Int32)
463__OMP_RTL(__kmpc_end_serialized_parallel, false, Void, IdentPtr, Int32)
464__OMP_RTL(__kmpc_shuffle_int32, false, Int32, Int32, Int16, Int16)
465__OMP_RTL(__kmpc_nvptx_parallel_reduce_nowait_v2, false, Int32, IdentPtr, Int32,
466 Int32, SizeTy, VoidPtr, ShuffleReducePtr, InterWarpCopyPtr)
467__OMP_RTL(__kmpc_nvptx_end_reduce_nowait, false, Void, Int32)
468__OMP_RTL(__kmpc_nvptx_teams_reduce_nowait_v2, false, Int32, IdentPtr, Int32,
469 VoidPtr, Int32, VoidPtr, ShuffleReducePtr, InterWarpCopyPtr,
470 GlobalListPtr, GlobalListPtr, GlobalListPtr, GlobalListPtr)
471
472__OMP_RTL(__kmpc_shuffle_int64, false, Int64, Int64, Int16, Int16)
473
474__OMP_RTL(__kmpc_alloc_shared, false, VoidPtr, SizeTy)
475__OMP_RTL(__kmpc_free_shared, false, Void, VoidPtr, SizeTy)
476__OMP_RTL(__kmpc_begin_sharing_variables, false, Void, VoidPtrPtrPtr, SizeTy)
477__OMP_RTL(__kmpc_end_sharing_variables, false, Void, )
478__OMP_RTL(__kmpc_get_shared_variables, false, Void, VoidPtrPtrPtr)
479__OMP_RTL(__kmpc_parallel_level, false, Int16, IdentPtr, Int32)
480__OMP_RTL(__kmpc_is_spmd_exec_mode, false, Int8, )
481__OMP_RTL(__kmpc_barrier_simple_spmd, false, Void, IdentPtr, Int32)
482__OMP_RTL(__kmpc_barrier_simple_generic, false, Void, IdentPtr, Int32)
483
484__OMP_RTL(__kmpc_warp_active_thread_mask, false, Int64,)
485__OMP_RTL(__kmpc_syncwarp, false, Void, Int64)
486
487__OMP_RTL(__last, false, Void, )
488
489#undef __OMP_RTL
490#undef OMP_RTL
491
492#define ParamAttrs(...) ArrayRef<AttributeSet>({__VA_ARGS__})
493#define EnumAttr(Kind) Attribute::get(Ctx, Attribute::AttrKind::Kind)
494#define EnumAttrInt(Kind, N) Attribute::get(Ctx, Attribute::AttrKind::Kind, N)
495#define AllocSizeAttr(N, M) Attribute::getWithAllocSizeArgs(Ctx, N, M)
496#define MemoryAttr(ME) Attribute::getWithMemoryEffects(Ctx, ME)
497#define AttributeSet(...) \
498 AttributeSet::get(Ctx, ArrayRef<Attribute>({__VA_ARGS__}))
499
500#ifndef OMP_ATTRS_SET
501#define OMP_ATTRS_SET(VarName, AttrSet)
502#endif
503
504#define __OMP_ATTRS_SET(VarName, AttrSet) OMP_ATTRS_SET(VarName, AttrSet)
505
506__OMP_ATTRS_SET(
507 GetterAttrs,
508 OptimisticAttributes
509 ? AttributeSet(
510 EnumAttr(NoUnwind), EnumAttr(NoSync), EnumAttr(NoFree),
511 EnumAttr(WillReturn),
512 MemoryAttr(MemoryEffects::inaccessibleMemOnly(ModRefInfo::Ref)))
513 : AttributeSet(EnumAttr(NoUnwind)))
514__OMP_ATTRS_SET(
515 GetterArgReadAttrs,
516 OptimisticAttributes
517 ? AttributeSet(
518 EnumAttr(NoUnwind), EnumAttr(NoSync), EnumAttr(NoFree),
519 EnumAttr(WillReturn),
520 MemoryAttr(MemoryEffects::inaccessibleOrArgMemOnly(ModRefInfo::Ref)))
521 : AttributeSet(EnumAttr(NoUnwind)))
522__OMP_ATTRS_SET(
523 GetterArgWriteAttrs,
524 OptimisticAttributes
525 ? AttributeSet(EnumAttr(NoUnwind), EnumAttr(NoSync), EnumAttr(NoFree),
526 EnumAttr(WillReturn),
527 MemoryAttr(MemoryEffects::argMemOnly() | MemoryEffects::inaccessibleMemOnly(ModRefInfo::Ref)))
528 : AttributeSet(EnumAttr(NoUnwind)))
529__OMP_ATTRS_SET(
530 SetterAttrs,
531 OptimisticAttributes
532 ? AttributeSet(
533 EnumAttr(NoUnwind), EnumAttr(NoSync), EnumAttr(NoFree),
534 EnumAttr(WillReturn),
535 MemoryAttr(MemoryEffects::inaccessibleMemOnly(ModRefInfo::Mod)))
536 : AttributeSet(EnumAttr(NoUnwind)))
537
538__OMP_ATTRS_SET(DefaultAttrs,
539 OptimisticAttributes
540 ? AttributeSet(EnumAttr(NoUnwind), EnumAttr(NoSync),
541 EnumAttr(WillReturn), EnumAttr(NoFree))
542 : AttributeSet(EnumAttr(NoUnwind)))
543
544__OMP_ATTRS_SET(BarrierAttrs,
545 OptimisticAttributes
546 ? AttributeSet(EnumAttr(NoUnwind), EnumAttr(Convergent))
547 : AttributeSet(EnumAttr(NoUnwind), EnumAttr(Convergent)))
548
549__OMP_ATTRS_SET(
550 InaccessibleArgOnlyAttrs,
551 OptimisticAttributes
552 ? AttributeSet(EnumAttr(NoUnwind), EnumAttr(NoSync), EnumAttr(NoFree),
553 EnumAttr(WillReturn),
554 MemoryAttr(MemoryEffects::inaccessibleOrArgMemOnly()))
555 : AttributeSet(EnumAttr(NoUnwind)))
556
557__OMP_ATTRS_SET(AlwaysInlineAttrs,
558 OptimisticAttributes
559 ? AttributeSet(EnumAttr(AlwaysInline))
560 : AttributeSet(EnumAttr(AlwaysInline)))
561
562#if 0
563__OMP_ATTRS_SET(
564 InaccessibleOnlyAttrs,
565 OptimisticAttributes
566 ? AttributeSet(EnumAttr(NoUnwind), EnumAttr(NoSync), EnumAttr(NoFree),
567 EnumAttr(WillReturn),
568 MemoryAttr(MemoryEffects::inaccessibleMemOnly()))
569 : AttributeSet(EnumAttr(NoUnwind)))
570#endif
571
572__OMP_ATTRS_SET(AllocAttrs,
573 OptimisticAttributes
574 ? AttributeSet(EnumAttr(NoUnwind), EnumAttr(NoSync),
575 EnumAttr(WillReturn))
576 : AttributeSet(EnumAttr(NoUnwind)))
577
578__OMP_ATTRS_SET(ForkAttrs, OptimisticAttributes
579 ? AttributeSet(EnumAttr(NoUnwind))
580 : AttributeSet(EnumAttr(NoUnwind)))
581
582__OMP_ATTRS_SET(ReadOnlyPtrAttrs,
583 OptimisticAttributes
584 ? AttributeSet(EnumAttr(ReadOnly), EnumAttr(NoFree),
585 EnumAttr(NoCapture))
586 : AttributeSet())
587
588__OMP_ATTRS_SET(DeviceAllocAttrs,
589 OptimisticAttributes
590 ? AttributeSet(EnumAttr(NoUnwind), EnumAttr(NoSync))
591 : AttributeSet(EnumAttr(NoUnwind), EnumAttr(NoSync)))
592
593#if 0
594__OMP_ATTRS_SET(WriteOnlyPtrAttrs,
595 OptimisticAttributes
596 ? AttributeSet(EnumAttr(WriteOnly), EnumAttr(NoFree),
597 EnumAttr(NoCapture))
598 : AttributeSet())
599#endif
600
601__OMP_ATTRS_SET(ArgPtrAttrs,
602 OptimisticAttributes
603 ? AttributeSet(EnumAttr(NoCapture), EnumAttr(NoFree))
604 : AttributeSet())
605
606__OMP_ATTRS_SET(ReturnPtrAttrs,
607 OptimisticAttributes
608 ? AttributeSet(EnumAttr(NoAlias))
609 : AttributeSet())
610
611__OMP_ATTRS_SET(ZExt, AttributeSet(EnumAttr(ZExt)))
612__OMP_ATTRS_SET(SExt, AttributeSet(EnumAttr(SExt)))
613__OMP_ATTRS_SET(SizeTyExt,
614 M.getDataLayout().getIntPtrType(Ctx)->getBitWidth() < 64
615 ? AttributeSet(EnumAttr(ZExt))
616 : AttributeSet())
617
618#if 0
619__OMP_ATTRS_SET(ReturnAlignedPtrAttrs,
620 OptimisticAttributes
621 ? AttributeSet(EnumAttr(NoAlias), EnumAttrInt(Alignment, 8),
622 EnumAttrInt(DereferenceableOrNull, 8))
623 : AttributeSet())
624#endif
625
626#undef __OMP_ATTRS_SET
627#undef OMP_ATTRS_SET
628
629#ifndef OMP_RTL_ATTRS
630#define OMP_RTL_ATTRS(Enum, FnAttrSet, RetAttrSet, ArgAttrSets)
631#endif
632
633#define __OMP_RTL_ATTRS(Name, FnAttrSet, RetAttrSet, ArgAttrSets) \
634 OMP_RTL_ATTRS(OMPRTL_##Name, FnAttrSet, RetAttrSet, ArgAttrSets)
635
636__OMP_RTL_ATTRS(__kmpc_barrier, BarrierAttrs, AttributeSet(),
637 ParamAttrs(ReadOnlyPtrAttrs, SExt))
638__OMP_RTL_ATTRS(__kmpc_barrier_simple_spmd, BarrierAttrs, AttributeSet(),
639 ParamAttrs(ReadOnlyPtrAttrs, SExt))
640__OMP_RTL_ATTRS(__kmpc_barrier_simple_generic, BarrierAttrs, AttributeSet(),
641 ParamAttrs(ReadOnlyPtrAttrs, SExt))
642__OMP_RTL_ATTRS(__kmpc_warp_active_thread_mask, BarrierAttrs, AttributeSet(),
643 ParamAttrs())
644__OMP_RTL_ATTRS(__kmpc_syncwarp, BarrierAttrs, AttributeSet(), ParamAttrs())
645__OMP_RTL_ATTRS(__kmpc_cancel, InaccessibleArgOnlyAttrs, SExt,
646 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
647__OMP_RTL_ATTRS(__kmpc_cancel_barrier, BarrierAttrs, SExt,
648 ParamAttrs(ReadOnlyPtrAttrs, SExt))
649__OMP_RTL_ATTRS(__kmpc_error, AttributeSet(), AttributeSet(),
650 ParamAttrs(AttributeSet(), SExt))
651__OMP_RTL_ATTRS(__kmpc_flush, BarrierAttrs, AttributeSet(),
652 ParamAttrs(ReadOnlyPtrAttrs))
653__OMP_RTL_ATTRS(__kmpc_global_thread_num, GetterArgReadAttrs, SExt,
654 ParamAttrs(ReadOnlyPtrAttrs))
655__OMP_RTL_ATTRS(__kmpc_get_hardware_thread_id_in_block, GetterAttrs, ZExt,
656 ParamAttrs())
657__OMP_RTL_ATTRS(__kmpc_fork_call, ForkAttrs, AttributeSet(),
658 ParamAttrs(ReadOnlyPtrAttrs, SExt, ReadOnlyPtrAttrs))
659__OMP_RTL_ATTRS(__kmpc_fork_call_if, AttributeSet(), AttributeSet(),
660 ParamAttrs(ReadOnlyPtrAttrs, SExt, ReadOnlyPtrAttrs, SExt))
661__OMP_RTL_ATTRS(__kmpc_omp_taskwait, BarrierAttrs, SExt,
662 ParamAttrs(ReadOnlyPtrAttrs, SExt))
663__OMP_RTL_ATTRS(__kmpc_omp_taskyield, InaccessibleArgOnlyAttrs, SExt,
664 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
665__OMP_RTL_ATTRS(__kmpc_push_num_threads, InaccessibleArgOnlyAttrs,
666 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
667__OMP_RTL_ATTRS(__kmpc_push_proc_bind, InaccessibleArgOnlyAttrs, AttributeSet(),
668 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
669__OMP_RTL_ATTRS(__kmpc_omp_reg_task_with_affinity, DefaultAttrs, SExt,
670 ParamAttrs(ReadOnlyPtrAttrs, SExt, ReadOnlyPtrAttrs,
671 SExt, ReadOnlyPtrAttrs))
672
673__OMP_RTL_ATTRS(__kmpc_get_hardware_num_blocks, GetterAttrs, ZExt, ParamAttrs())
674__OMP_RTL_ATTRS(__kmpc_get_hardware_num_threads_in_block, GetterAttrs, ZExt, ParamAttrs())
675__OMP_RTL_ATTRS(__kmpc_get_warp_size, GetterAttrs, ZExt, ParamAttrs())
676
677__OMP_RTL_ATTRS(omp_get_thread_num, GetterAttrs, SExt, ParamAttrs())
678__OMP_RTL_ATTRS(omp_get_num_threads, GetterAttrs, SExt, ParamAttrs())
679__OMP_RTL_ATTRS(omp_get_max_threads, GetterAttrs, SExt, ParamAttrs())
680__OMP_RTL_ATTRS(omp_in_parallel, GetterAttrs, SExt, ParamAttrs())
681__OMP_RTL_ATTRS(omp_get_dynamic, GetterAttrs, SExt, ParamAttrs())
682__OMP_RTL_ATTRS(omp_get_cancellation, GetterAttrs, SExt, ParamAttrs())
683__OMP_RTL_ATTRS(omp_get_nested, GetterAttrs, SExt, ParamAttrs())
684__OMP_RTL_ATTRS(
685 omp_get_schedule, GetterArgWriteAttrs, AttributeSet(),
686 ParamAttrs(AttributeSet(EnumAttr(NoCapture), EnumAttr(WriteOnly)),
687 AttributeSet(EnumAttr(NoCapture), EnumAttr(WriteOnly))))
688__OMP_RTL_ATTRS(omp_get_thread_limit, GetterAttrs, SExt, ParamAttrs())
689__OMP_RTL_ATTRS(omp_get_supported_active_levels, GetterAttrs, SExt, ParamAttrs())
690__OMP_RTL_ATTRS(omp_get_max_active_levels, GetterAttrs, SExt, ParamAttrs())
691__OMP_RTL_ATTRS(omp_get_level, GetterAttrs, SExt, ParamAttrs())
692__OMP_RTL_ATTRS(omp_get_ancestor_thread_num, GetterAttrs, SExt, ParamAttrs(SExt))
693__OMP_RTL_ATTRS(omp_get_team_size, GetterAttrs, SExt, ParamAttrs(SExt))
694__OMP_RTL_ATTRS(omp_get_active_level, GetterAttrs, SExt, ParamAttrs())
695__OMP_RTL_ATTRS(omp_in_final, GetterAttrs, SExt, ParamAttrs())
696__OMP_RTL_ATTRS(omp_get_proc_bind, GetterAttrs, SExt, ParamAttrs())
697__OMP_RTL_ATTRS(omp_get_num_places, GetterAttrs, SExt, ParamAttrs())
698__OMP_RTL_ATTRS(omp_get_num_procs, GetterAttrs, SExt, ParamAttrs())
699__OMP_RTL_ATTRS(omp_get_place_proc_ids, GetterArgWriteAttrs, AttributeSet(),
700 ParamAttrs(SExt, AttributeSet(EnumAttr(NoCapture),
701 EnumAttr(WriteOnly))))
702__OMP_RTL_ATTRS(omp_get_place_num, GetterAttrs, SExt, ParamAttrs())
703__OMP_RTL_ATTRS(omp_get_partition_num_places, GetterAttrs, SExt, ParamAttrs())
704__OMP_RTL_ATTRS(omp_get_partition_place_nums, GetterArgWriteAttrs, AttributeSet(),
705 ParamAttrs())
706__OMP_RTL_ATTRS(omp_get_wtime, GetterAttrs, AttributeSet(), ParamAttrs())
707
708__OMP_RTL_ATTRS(omp_set_num_threads, SetterAttrs, AttributeSet(),
709 ParamAttrs(SExt))
710__OMP_RTL_ATTRS(omp_set_dynamic, SetterAttrs, AttributeSet(), ParamAttrs(SExt))
711__OMP_RTL_ATTRS(omp_set_nested, SetterAttrs, AttributeSet(), ParamAttrs(SExt))
712__OMP_RTL_ATTRS(omp_set_schedule, SetterAttrs, AttributeSet(),
713 ParamAttrs(SExt, SExt))
714__OMP_RTL_ATTRS(omp_set_max_active_levels, SetterAttrs, AttributeSet(),
715 ParamAttrs(SExt))
716
717__OMP_RTL_ATTRS(__kmpc_master, InaccessibleArgOnlyAttrs, SExt,
718 ParamAttrs(ReadOnlyPtrAttrs, SExt))
719__OMP_RTL_ATTRS(__kmpc_end_master, InaccessibleArgOnlyAttrs, AttributeSet(),
720 ParamAttrs(ReadOnlyPtrAttrs, SExt))
721__OMP_RTL_ATTRS(__kmpc_masked, InaccessibleArgOnlyAttrs, SExt,
722 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
723__OMP_RTL_ATTRS(__kmpc_end_masked, InaccessibleArgOnlyAttrs, AttributeSet(),
724 ParamAttrs(ReadOnlyPtrAttrs, SExt))
725__OMP_RTL_ATTRS(__kmpc_critical, BarrierAttrs, AttributeSet(),
726 ParamAttrs(ReadOnlyPtrAttrs, SExt, AttributeSet()))
727__OMP_RTL_ATTRS(__kmpc_critical_with_hint, BarrierAttrs, AttributeSet(),
728 ParamAttrs(ReadOnlyPtrAttrs, SExt, AttributeSet(), ZExt))
729__OMP_RTL_ATTRS(__kmpc_end_critical, BarrierAttrs, AttributeSet(),
730 ParamAttrs(ReadOnlyPtrAttrs, SExt, AttributeSet()))
731
732__OMP_RTL_ATTRS(__kmpc_begin, DefaultAttrs, AttributeSet(),
733 ParamAttrs(ReadOnlyPtrAttrs, SExt))
734__OMP_RTL_ATTRS(__kmpc_end, DefaultAttrs, AttributeSet(),
735 ParamAttrs(ReadOnlyPtrAttrs))
736
737__OMP_RTL_ATTRS(__kmpc_reduce, BarrierAttrs, SExt,
738 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, SizeTyExt,
739 ReadOnlyPtrAttrs, AttributeSet()))
740__OMP_RTL_ATTRS(__kmpc_reduce_nowait, BarrierAttrs, SExt,
741 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, SizeTyExt,
742 ReadOnlyPtrAttrs, AttributeSet()))
743__OMP_RTL_ATTRS(__kmpc_end_reduce, BarrierAttrs, AttributeSet(),
744 ParamAttrs(ReadOnlyPtrAttrs, SExt, AttributeSet()))
745__OMP_RTL_ATTRS(__kmpc_end_reduce_nowait, BarrierAttrs, AttributeSet(),
746 ParamAttrs(ReadOnlyPtrAttrs, SExt, AttributeSet()))
747
748__OMP_RTL_ATTRS(__kmpc_ordered, BarrierAttrs, AttributeSet(),
749 ParamAttrs(ReadOnlyPtrAttrs, SExt))
750__OMP_RTL_ATTRS(__kmpc_end_ordered, BarrierAttrs, AttributeSet(),
751 ParamAttrs(ReadOnlyPtrAttrs, SExt))
752
753__OMP_RTL_ATTRS(__kmpc_for_static_init_4, GetterArgWriteAttrs, AttributeSet(),
754 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
755 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs, SExt, SExt))
756__OMP_RTL_ATTRS(__kmpc_for_static_init_4u, GetterArgWriteAttrs, AttributeSet(),
757 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
758 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs, SExt, SExt))
759__OMP_RTL_ATTRS(__kmpc_for_static_init_8, GetterArgWriteAttrs, AttributeSet(),
760 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
761 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs,
762 AttributeSet(), AttributeSet()))
763__OMP_RTL_ATTRS(__kmpc_for_static_init_8u, GetterArgWriteAttrs, AttributeSet(),
764 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
765 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs,
766 AttributeSet(), AttributeSet()))
767__OMP_RTL_ATTRS(__kmpc_for_static_fini, InaccessibleArgOnlyAttrs,
768 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt))
769__OMP_RTL_ATTRS(__kmpc_distribute_static_init_4, GetterArgWriteAttrs,
770 AttributeSet(),
771 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
772 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs, SExt, SExt))
773__OMP_RTL_ATTRS(__kmpc_distribute_static_init_4u, GetterArgWriteAttrs,
774 AttributeSet(),
775 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
776 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs, SExt, SExt))
777__OMP_RTL_ATTRS(__kmpc_distribute_static_init_8, GetterArgWriteAttrs,
778 AttributeSet(),
779 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
780 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs,
781 AttributeSet(), AttributeSet()))
782__OMP_RTL_ATTRS(__kmpc_distribute_static_init_8u, GetterArgWriteAttrs,
783 AttributeSet(),
784 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
785 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs,
786 AttributeSet(), AttributeSet()))
787__OMP_RTL_ATTRS(__kmpc_distribute_static_fini, InaccessibleArgOnlyAttrs,
788 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt))
789__OMP_RTL_ATTRS(__kmpc_dist_dispatch_init_4, GetterArgWriteAttrs,
790 AttributeSet(),
791 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs, SExt,
792 SExt, SExt, SExt))
793__OMP_RTL_ATTRS(__kmpc_dist_dispatch_init_4u, GetterArgWriteAttrs,
794 AttributeSet(),
795 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs, ZExt,
796 ZExt, SExt, SExt))
797__OMP_RTL_ATTRS(__kmpc_dist_dispatch_init_8, GetterArgWriteAttrs,
798 AttributeSet(),
799 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs))
800__OMP_RTL_ATTRS(__kmpc_dist_dispatch_init_8u, GetterArgWriteAttrs,
801 AttributeSet(),
802 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs))
803__OMP_RTL_ATTRS(__kmpc_dispatch_init_4, GetterArgWriteAttrs, AttributeSet(),
804 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, SExt, SExt, SExt, SExt))
805__OMP_RTL_ATTRS(__kmpc_dispatch_init_4u, GetterArgWriteAttrs, AttributeSet(),
806 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ZExt, ZExt, SExt, SExt))
807__OMP_RTL_ATTRS(__kmpc_dispatch_init_8, GetterArgWriteAttrs, AttributeSet(),
808 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
809__OMP_RTL_ATTRS(__kmpc_dispatch_init_8u, GetterArgWriteAttrs, AttributeSet(),
810 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
811__OMP_RTL_ATTRS(__kmpc_dispatch_next_4, GetterArgWriteAttrs, SExt,
812 ParamAttrs(ReadOnlyPtrAttrs, SExt, ArgPtrAttrs, ArgPtrAttrs,
813 ArgPtrAttrs, ArgPtrAttrs))
814__OMP_RTL_ATTRS(__kmpc_dispatch_next_4u, GetterArgWriteAttrs, SExt,
815 ParamAttrs(ReadOnlyPtrAttrs, SExt, ArgPtrAttrs, ArgPtrAttrs,
816 ArgPtrAttrs, ArgPtrAttrs))
817__OMP_RTL_ATTRS(__kmpc_dispatch_next_8, GetterArgWriteAttrs, SExt,
818 ParamAttrs(ReadOnlyPtrAttrs, SExt, ArgPtrAttrs, ArgPtrAttrs,
819 ArgPtrAttrs, ArgPtrAttrs))
820__OMP_RTL_ATTRS(__kmpc_dispatch_next_8u, GetterArgWriteAttrs, SExt,
821 ParamAttrs(ReadOnlyPtrAttrs, SExt, ArgPtrAttrs, ArgPtrAttrs,
822 ArgPtrAttrs, ArgPtrAttrs))
823__OMP_RTL_ATTRS(__kmpc_dispatch_fini_4, InaccessibleArgOnlyAttrs,
824 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt))
825__OMP_RTL_ATTRS(__kmpc_dispatch_fini_4u, InaccessibleArgOnlyAttrs,
826 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt))
827__OMP_RTL_ATTRS(__kmpc_dispatch_fini_8, InaccessibleArgOnlyAttrs,
828 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt))
829__OMP_RTL_ATTRS(__kmpc_dispatch_fini_8u, InaccessibleArgOnlyAttrs,
830 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt))
831__OMP_RTL_ATTRS(__kmpc_team_static_init_4, GetterArgWriteAttrs, AttributeSet(),
832 ParamAttrs(ReadOnlyPtrAttrs, SExt, ArgPtrAttrs, ArgPtrAttrs,
833 ArgPtrAttrs, ArgPtrAttrs, SExt, SExt))
834__OMP_RTL_ATTRS(__kmpc_team_static_init_4u, GetterArgWriteAttrs, AttributeSet(),
835 ParamAttrs(ReadOnlyPtrAttrs, SExt, ArgPtrAttrs, ArgPtrAttrs,
836 ArgPtrAttrs, ArgPtrAttrs, SExt, SExt))
837__OMP_RTL_ATTRS(__kmpc_team_static_init_8, GetterArgWriteAttrs, AttributeSet(),
838 ParamAttrs(ReadOnlyPtrAttrs, SExt, ArgPtrAttrs, ArgPtrAttrs,
839 ArgPtrAttrs, ArgPtrAttrs))
840__OMP_RTL_ATTRS(__kmpc_team_static_init_8u, GetterArgWriteAttrs, AttributeSet(),
841 ParamAttrs(ReadOnlyPtrAttrs, SExt, ArgPtrAttrs, ArgPtrAttrs,
842 ArgPtrAttrs, ArgPtrAttrs))
843__OMP_RTL_ATTRS(__kmpc_dist_for_static_init_4, GetterArgWriteAttrs,
844 AttributeSet(),
845 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
846 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs,
847 ArgPtrAttrs, SExt, SExt))
848__OMP_RTL_ATTRS(__kmpc_dist_for_static_init_4u, GetterArgWriteAttrs,
849 AttributeSet(),
850 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
851 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs,
852 ArgPtrAttrs, SExt, SExt))
853__OMP_RTL_ATTRS(__kmpc_dist_for_static_init_8, GetterArgWriteAttrs,
854 AttributeSet(),
855 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
856 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs))
857__OMP_RTL_ATTRS(__kmpc_dist_for_static_init_8u, GetterArgWriteAttrs,
858 AttributeSet(),
859 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ArgPtrAttrs,
860 ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs, ArgPtrAttrs))
861
862__OMP_RTL_ATTRS(__kmpc_single, BarrierAttrs, SExt,
863 ParamAttrs(ReadOnlyPtrAttrs, SExt))
864__OMP_RTL_ATTRS(__kmpc_end_single, BarrierAttrs, AttributeSet(),
865 ParamAttrs(ReadOnlyPtrAttrs, SExt))
866
867__OMP_RTL_ATTRS(__kmpc_omp_task_alloc, DefaultAttrs, ReturnPtrAttrs,
868 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, SizeTyExt, SizeTyExt,
869 ReadOnlyPtrAttrs))
870__OMP_RTL_ATTRS(__kmpc_omp_task, DefaultAttrs, SExt,
871 ParamAttrs(ReadOnlyPtrAttrs, SExt, AttributeSet()))
872__OMP_RTL_ATTRS(__kmpc_end_taskgroup, BarrierAttrs, AttributeSet(),
873 ParamAttrs(ReadOnlyPtrAttrs, SExt))
874__OMP_RTL_ATTRS(__kmpc_taskgroup, BarrierAttrs, AttributeSet(),
875 ParamAttrs(ReadOnlyPtrAttrs, SExt))
876__OMP_RTL_ATTRS(__kmpc_omp_task_begin_if0, DefaultAttrs, AttributeSet(),
877 ParamAttrs(ReadOnlyPtrAttrs, SExt))
878__OMP_RTL_ATTRS(__kmpc_omp_task_complete_if0, DefaultAttrs, AttributeSet(),
879 ParamAttrs(ReadOnlyPtrAttrs, SExt))
880__OMP_RTL_ATTRS(__kmpc_omp_task_with_deps, DefaultAttrs, SExt,
881 ParamAttrs(ReadOnlyPtrAttrs, SExt, AttributeSet(), SExt,
882 ReadOnlyPtrAttrs, SExt, ReadOnlyPtrAttrs))
883__OMP_RTL_ATTRS(__kmpc_taskloop, DefaultAttrs, AttributeSet(),
884 ParamAttrs(ReadOnlyPtrAttrs, SExt, AttributeSet(), SExt,
885 ArgPtrAttrs, ArgPtrAttrs, AttributeSet(), SExt, SExt))
886__OMP_RTL_ATTRS(__kmpc_omp_target_task_alloc, DefaultAttrs, ReturnPtrAttrs,
887 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, SizeTyExt, SizeTyExt,
888 ReadOnlyPtrAttrs, AttributeSet()))
889__OMP_RTL_ATTRS(__kmpc_taskred_modifier_init, DefaultAttrs, ReturnPtrAttrs,
890 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, SExt))
891__OMP_RTL_ATTRS(__kmpc_taskred_init, DefaultAttrs, AttributeSet(),
892 ParamAttrs(SExt, SExt))
893__OMP_RTL_ATTRS(__kmpc_task_reduction_modifier_fini, BarrierAttrs,
894 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
895__OMP_RTL_ATTRS(__kmpc_task_reduction_get_th_data, DefaultAttrs, ReturnPtrAttrs,
896 ParamAttrs(SExt))
897__OMP_RTL_ATTRS(__kmpc_task_reduction_init, DefaultAttrs, ReturnPtrAttrs,
898 ParamAttrs(SExt, SExt))
899__OMP_RTL_ATTRS(__kmpc_task_reduction_modifier_init, DefaultAttrs,
900 ReturnPtrAttrs, ParamAttrs(AttributeSet(), SExt, SExt, SExt))
901__OMP_RTL_ATTRS(__kmpc_proxy_task_completed_ooo, DefaultAttrs, AttributeSet(),
902 ParamAttrs())
903
904__OMP_RTL_ATTRS(__kmpc_omp_wait_deps, BarrierAttrs, AttributeSet(),
905 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ReadOnlyPtrAttrs, SExt))
906__OMP_RTL_ATTRS(__kmpc_omp_taskwait_deps_51, BarrierAttrs, AttributeSet(),
907 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, ReadOnlyPtrAttrs))
908__OMP_RTL_ATTRS(__kmpc_cancellationpoint, DefaultAttrs, SExt,
909 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
910
911__OMP_RTL_ATTRS(__kmpc_fork_teams, ForkAttrs, AttributeSet(),
912 ParamAttrs(ReadOnlyPtrAttrs, SExt, ReadOnlyPtrAttrs))
913__OMP_RTL_ATTRS(__kmpc_push_num_teams, InaccessibleArgOnlyAttrs, AttributeSet(),
914 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt, SExt))
915
916__OMP_RTL_ATTRS(__kmpc_copyprivate, DefaultAttrs, AttributeSet(),
917 ParamAttrs(ReadOnlyPtrAttrs, SExt, SizeTyExt,
918 ReadOnlyPtrAttrs, AttributeSet(), SExt))
919__OMP_RTL_ATTRS(__kmpc_threadprivate_cached, DefaultAttrs, ReturnPtrAttrs,
920 ParamAttrs(ReadOnlyPtrAttrs, SExt, AttributeSet(), SizeTyExt))
921__OMP_RTL_ATTRS(__kmpc_threadprivate_register, DefaultAttrs, AttributeSet(),
922 ParamAttrs(ReadOnlyPtrAttrs, AttributeSet(), ReadOnlyPtrAttrs,
923 ReadOnlyPtrAttrs, ReadOnlyPtrAttrs))
924
925__OMP_RTL_ATTRS(__kmpc_doacross_init, BarrierAttrs, AttributeSet(),
926 ParamAttrs(ReadOnlyPtrAttrs, SExt, SExt))
927__OMP_RTL_ATTRS(__kmpc_doacross_post, BarrierAttrs, AttributeSet(),
928 ParamAttrs(ReadOnlyPtrAttrs, SExt, ReadOnlyPtrAttrs))
929__OMP_RTL_ATTRS(__kmpc_doacross_wait, BarrierAttrs, AttributeSet(),
930 ParamAttrs(ReadOnlyPtrAttrs, SExt, ReadOnlyPtrAttrs))
931__OMP_RTL_ATTRS(__kmpc_doacross_fini, BarrierAttrs, AttributeSet(),
932 ParamAttrs(ReadOnlyPtrAttrs, SExt))
933
934__OMP_RTL_ATTRS(__kmpc_alloc_shared,
935 AttributeSet(EnumAttr(NoUnwind), EnumAttr(NoSync),
936 AllocSizeAttr(0, std::nullopt)),
937 ReturnPtrAttrs, ParamAttrs(SizeTyExt))
938__OMP_RTL_ATTRS(__kmpc_free_shared, DeviceAllocAttrs, AttributeSet(),
939 ParamAttrs(AttributeSet(EnumAttr(NoCapture),
940 EnumAttr(AllocatedPointer)),
941 SizeTyExt))
942__OMP_RTL_ATTRS(__kmpc_begin_sharing_variables, AttributeSet(), AttributeSet(),
943 ParamAttrs(AttributeSet(), SizeTyExt))
944
945__OMP_RTL_ATTRS(__kmpc_alloc, DefaultAttrs, ReturnPtrAttrs,
946 ParamAttrs(SExt, SizeTyExt))
947__OMP_RTL_ATTRS(__kmpc_aligned_alloc, DefaultAttrs, ReturnPtrAttrs,
948 ParamAttrs(SExt, SizeTyExt, SizeTyExt))
949__OMP_RTL_ATTRS(__kmpc_free, AllocAttrs, AttributeSet(),
950 ParamAttrs(SExt))
951
952__OMP_RTL_ATTRS(__tgt_interop_init, AttributeSet(), AttributeSet(),
953 ParamAttrs(AttributeSet(), SExt, AttributeSet(), SExt,
954 SExt, AttributeSet(), AttributeSet(), SExt))
955__OMP_RTL_ATTRS(__tgt_interop_destroy, AttributeSet(), AttributeSet(),
956 ParamAttrs(AttributeSet(), SExt, AttributeSet(), SExt, SExt,
957 AttributeSet(), SExt))
958__OMP_RTL_ATTRS(__tgt_interop_use, AttributeSet(), AttributeSet(),
959 ParamAttrs(AttributeSet(), SExt, AttributeSet(), SExt, SExt,
960 AttributeSet(), SExt))
961
962__OMP_RTL_ATTRS(__kmpc_init_allocator, DefaultAttrs, ReturnPtrAttrs,
963 ParamAttrs(SExt, AttributeSet(), SExt))
964__OMP_RTL_ATTRS(__kmpc_destroy_allocator, AllocAttrs, AttributeSet(),
965 ParamAttrs(SExt))
966
967__OMP_RTL_ATTRS(__kmpc_push_target_tripcount_mapper, SetterAttrs,
968 AttributeSet(), ParamAttrs())
969__OMP_RTL_ATTRS(__tgt_target_mapper, ForkAttrs, SExt,
970 ParamAttrs(AttributeSet(),AttributeSet(),AttributeSet(), SExt))
971__OMP_RTL_ATTRS(__tgt_target_nowait_mapper, ForkAttrs, SExt,
972 ParamAttrs(AttributeSet(), AttributeSet(), AttributeSet(), SExt,
973 AttributeSet(), AttributeSet(), AttributeSet(),
974 AttributeSet(), AttributeSet(), AttributeSet(),
975 SExt, AttributeSet(), SExt))
976__OMP_RTL_ATTRS(__tgt_target_teams_mapper, ForkAttrs, SExt,
977 ParamAttrs(AttributeSet(), AttributeSet(), AttributeSet(), SExt,
978 AttributeSet(), AttributeSet(), AttributeSet(),
979 AttributeSet(), AttributeSet(), AttributeSet(), SExt,
980 SExt))
981__OMP_RTL_ATTRS(__tgt_target_teams_nowait_mapper, ForkAttrs, SExt,
982 ParamAttrs(AttributeSet(), AttributeSet(), AttributeSet(), SExt,
983 AttributeSet(), AttributeSet(), AttributeSet(),
984 AttributeSet(), AttributeSet(), AttributeSet(),
985 SExt, SExt, SExt, AttributeSet(), SExt))
986__OMP_RTL_ATTRS(__tgt_target_kernel, ForkAttrs, SExt,
987 ParamAttrs(AttributeSet(), AttributeSet(), SExt, SExt))
988__OMP_RTL_ATTRS(__tgt_target_kernel_nowait, ForkAttrs, SExt,
989 ParamAttrs(AttributeSet(), AttributeSet(), SExt, SExt,
990 AttributeSet(), AttributeSet(), SExt, AttributeSet(),
991 SExt))
992__OMP_RTL_ATTRS(__tgt_register_requires, ForkAttrs, AttributeSet(),
993 ParamAttrs())
994__OMP_RTL_ATTRS(__tgt_target_data_begin_mapper, ForkAttrs, AttributeSet(),
995 ParamAttrs(AttributeSet(), AttributeSet(), SExt))
996__OMP_RTL_ATTRS(__tgt_target_data_begin_nowait_mapper, ForkAttrs, AttributeSet(),
997 ParamAttrs(AttributeSet(), AttributeSet(), SExt, AttributeSet(),
998 AttributeSet(), AttributeSet(), AttributeSet(),
999 AttributeSet(), AttributeSet()))
1000__OMP_RTL_ATTRS(__tgt_target_data_begin_mapper_issue, AttributeSet(),
1001 AttributeSet(),
1002 ParamAttrs(AttributeSet(), AttributeSet(), SExt))
1003__OMP_RTL_ATTRS(__tgt_target_data_end_mapper, ForkAttrs, AttributeSet(),
1004 ParamAttrs(AttributeSet(), AttributeSet(), SExt))
1005__OMP_RTL_ATTRS(__tgt_target_data_end_nowait_mapper, ForkAttrs, AttributeSet(),
1006 ParamAttrs(AttributeSet(), AttributeSet(), SExt, AttributeSet(),
1007 AttributeSet(), AttributeSet(), AttributeSet(),
1008 AttributeSet(), AttributeSet()))
1009__OMP_RTL_ATTRS(__tgt_target_data_update_mapper, ForkAttrs, AttributeSet(),
1010 ParamAttrs(AttributeSet(), AttributeSet(), SExt))
1011__OMP_RTL_ATTRS(__tgt_target_data_update_nowait_mapper, ForkAttrs, AttributeSet(),
1012 ParamAttrs(AttributeSet(), AttributeSet(), SExt, AttributeSet(),
1013 AttributeSet(), AttributeSet(), AttributeSet(),
1014 AttributeSet(), AttributeSet()))
1015__OMP_RTL_ATTRS(__tgt_mapper_num_components, ForkAttrs, AttributeSet(),
1016 ParamAttrs())
1017__OMP_RTL_ATTRS(__tgt_push_mapper_component, ForkAttrs, AttributeSet(),
1018 ParamAttrs())
1019__OMP_RTL_ATTRS(__kmpc_task_allow_completion_event, DefaultAttrs,
1020 ReturnPtrAttrs, ParamAttrs(ReadOnlyPtrAttrs, SExt))
1021
1022__OMP_RTL_ATTRS(__kmpc_target_init, AttributeSet(), SExt,
1023 ParamAttrs(AttributeSet(), SExt, SExt))
1024__OMP_RTL_ATTRS(__kmpc_target_deinit, AttributeSet(), AttributeSet(),
1025 ParamAttrs(AttributeSet(), SExt))
1026__OMP_RTL_ATTRS(__kmpc_parallel_51, AlwaysInlineAttrs, AttributeSet(),
1027 ParamAttrs(AttributeSet(), SExt, SExt, SExt, SExt,
1028 AttributeSet(), AttributeSet(), AttributeSet(),
1029 SizeTyExt))
1030__OMP_RTL_ATTRS(__kmpc_serialized_parallel, InaccessibleArgOnlyAttrs,
1031 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt))
1032__OMP_RTL_ATTRS(__kmpc_end_serialized_parallel, InaccessibleArgOnlyAttrs,
1033 AttributeSet(), ParamAttrs(ReadOnlyPtrAttrs, SExt))
1034__OMP_RTL_ATTRS(__kmpc_shuffle_int32, AttributeSet(), SExt,
1035 ParamAttrs(SExt, SExt, SExt))
1036__OMP_RTL_ATTRS(__kmpc_nvptx_parallel_reduce_nowait_v2, AttributeSet(), SExt,
1037 ParamAttrs(AttributeSet(), SExt, SExt, SizeTyExt))
1038__OMP_RTL_ATTRS(__kmpc_nvptx_end_reduce_nowait, AttributeSet(), AttributeSet(),
1039 ParamAttrs(SExt))
1040__OMP_RTL_ATTRS(__kmpc_nvptx_teams_reduce_nowait_v2, AttributeSet(), SExt,
1041 ParamAttrs(AttributeSet(), SExt, AttributeSet(), ZExt))
1042
1043__OMP_RTL_ATTRS(__kmpc_shuffle_int64, AttributeSet(), AttributeSet(),
1044 ParamAttrs(AttributeSet(), SExt, SExt))
1045
1046__OMP_RTL_ATTRS(__kmpc_is_spmd_exec_mode, AttributeSet(), SExt, ParamAttrs())
1047
1048#undef __OMP_RTL_ATTRS
1049#undef OMP_RTL_ATTRS
1050#undef AttributeSet
1051#undef EnumAttr
1052#undef EnumAttrInt
1053#undef ParamAttrs
1054#undef AllocSizeAttr
1055
1056///}
1057
1058/// KMP ident_t bit flags
1059///
1060/// In accordance with the values in `openmp/runtime/src/kmp.h`.
1061///
1062///{
1063
1064#ifndef OMP_IDENT_FLAG
1065#define OMP_IDENT_FLAG(Enum, Str, Value)
1066#endif
1067
1068#define __OMP_IDENT_FLAG(Name, Value) \
1069 OMP_IDENT_FLAG(OMP_IDENT_FLAG_##Name, #Name, Value)
1070
1071__OMP_IDENT_FLAG(KMPC, 0x02)
1072__OMP_IDENT_FLAG(ATOMIC_REDUCE, 0x10)
1073__OMP_IDENT_FLAG(BARRIER_EXPL, 0x20)
1074__OMP_IDENT_FLAG(BARRIER_IMPL, 0x0040)
1075__OMP_IDENT_FLAG(BARRIER_IMPL_MASK, 0x01C0)
1076__OMP_IDENT_FLAG(BARRIER_IMPL_FOR, 0x0040)
1077__OMP_IDENT_FLAG(BARRIER_IMPL_SECTIONS, 0x00C0)
1078__OMP_IDENT_FLAG(BARRIER_IMPL_SINGLE, 0x0140)
1079__OMP_IDENT_FLAG(BARRIER_IMPL_WORKSHARE, 0x01C0)
1080
1081#undef __OMP_IDENT_FLAG
1082#undef OMP_IDENT_FLAG
1083
1084///}
1085
1086/// KMP cancel kind
1087///
1088///{
1089
1090#ifndef OMP_CANCEL_KIND
1091#define OMP_CANCEL_KIND(Enum, Str, DirectiveEnum, Value)
1092#endif
1093
1094#define __OMP_CANCEL_KIND(Name, Value) \
1095 OMP_CANCEL_KIND(OMP_CANCEL_KIND_##Name, #Name, OMPD_##Name, Value)
1096
1097__OMP_CANCEL_KIND(parallel, 1)
1098__OMP_CANCEL_KIND(for, 2)
1099__OMP_CANCEL_KIND(sections, 3)
1100__OMP_CANCEL_KIND(taskgroup, 4)
1101
1102#undef __OMP_CANCEL_KIND
1103#undef OMP_CANCEL_KIND
1104
1105///}
1106
1107/// Default kinds
1108///
1109///{
1110
1111#ifndef OMP_DEFAULT_KIND
1112#define OMP_DEFAULT_KIND(Enum, Str)
1113#endif
1114
1115#define __OMP_DEFAULT_KIND(Name) OMP_DEFAULT_KIND(OMP_DEFAULT_##Name, #Name)
1116
1117__OMP_DEFAULT_KIND(none)
1118__OMP_DEFAULT_KIND(shared)
1119__OMP_DEFAULT_KIND(private)
1120__OMP_DEFAULT_KIND(firstprivate)
1121__OMP_DEFAULT_KIND(unknown)
1122
1123#undef __OMP_DEFAULT_KIND
1124#undef OMP_DEFAULT_KIND
1125
1126///}
1127
1128/// Proc bind kinds
1129///
1130///{
1131
1132#ifndef OMP_PROC_BIND_KIND
1133#define OMP_PROC_BIND_KIND(Enum, Str, Value)
1134#endif
1135
1136#define __OMP_PROC_BIND_KIND(Name, Value) \
1137 OMP_PROC_BIND_KIND(OMP_PROC_BIND_##Name, #Name, Value)
1138
1139__OMP_PROC_BIND_KIND(master, 2)
1140__OMP_PROC_BIND_KIND(close, 3)
1141__OMP_PROC_BIND_KIND(spread, 4)
1142__OMP_PROC_BIND_KIND(primary, 5)
1143__OMP_PROC_BIND_KIND(default, 6)
1144__OMP_PROC_BIND_KIND(unknown, 7)
1145
1146#undef __OMP_PROC_BIND_KIND
1147#undef OMP_PROC_BIND_KIND
1148
1149///}
1150
1151/// OpenMP context related definitions:
1152/// - trait set selector
1153/// - trait selector
1154/// - trait property
1155///
1156///{
1157
1158#ifndef OMP_TRAIT_SET
1159#define OMP_TRAIT_SET(Enum, Str)
1160#endif
1161#ifndef OMP_TRAIT_SELECTOR
1162#define OMP_TRAIT_SELECTOR(Enum, TraitSetEnum, Str, RequiresProperty)
1163#endif
1164#ifndef OMP_TRAIT_PROPERTY
1165#define OMP_TRAIT_PROPERTY(Enum, TraitSetEnum, TraitSelectorEnum, Str)
1166#endif
1167#ifndef OMP_LAST_TRAIT_PROPERTY
1168#define OMP_LAST_TRAIT_PROPERTY(Enum)
1169#endif
1170
1171#define __OMP_TRAIT_SET(Name) OMP_TRAIT_SET(Name, #Name)
1172#define __OMP_TRAIT_SELECTOR(TraitSet, Name, RequiresProperty) \
1173 OMP_TRAIT_SELECTOR(TraitSet##_##Name, TraitSet, #Name, RequiresProperty)
1174#define __OMP_TRAIT_SELECTOR_AND_PROPERTY(TraitSet, Name) \
1175 OMP_TRAIT_SELECTOR(TraitSet##_##Name, TraitSet, #Name, false) \
1176 OMP_TRAIT_PROPERTY(TraitSet##_##Name##_##Name, TraitSet, TraitSet##_##Name, \
1177 #Name)
1178#define __OMP_TRAIT_PROPERTY(TraitSet, TraitSelector, Name) \
1179 OMP_TRAIT_PROPERTY(TraitSet##_##TraitSelector##_##Name, TraitSet, \
1180 TraitSet##_##TraitSelector, #Name)
1181
1182// "invalid" must go first.
1183OMP_TRAIT_SET(invalid, "invalid")
1184OMP_TRAIT_SELECTOR(invalid, invalid, "invalid", false)
1185OMP_TRAIT_PROPERTY(invalid, invalid, invalid, "invalid")
1186
1187__OMP_TRAIT_SET(construct)
1188__OMP_TRAIT_SELECTOR_AND_PROPERTY(construct, target)
1189__OMP_TRAIT_SELECTOR_AND_PROPERTY(construct, teams)
1190__OMP_TRAIT_SELECTOR_AND_PROPERTY(construct, parallel)
1191__OMP_TRAIT_SELECTOR_AND_PROPERTY(construct, for)
1192__OMP_TRAIT_SELECTOR_AND_PROPERTY(construct, simd)
1193
1194__OMP_TRAIT_SET(device)
1195
1196__OMP_TRAIT_SELECTOR(device, kind, true)
1197
1198__OMP_TRAIT_PROPERTY(device, kind, host)
1199__OMP_TRAIT_PROPERTY(device, kind, nohost)
1200__OMP_TRAIT_PROPERTY(device, kind, cpu)
1201__OMP_TRAIT_PROPERTY(device, kind, gpu)
1202__OMP_TRAIT_PROPERTY(device, kind, fpga)
1203__OMP_TRAIT_PROPERTY(device, kind, any)
1204
1205__OMP_TRAIT_SELECTOR(device, arch, true)
1206
1207__OMP_TRAIT_PROPERTY(device, arch, arm)
1208__OMP_TRAIT_PROPERTY(device, arch, armeb)
1209__OMP_TRAIT_PROPERTY(device, arch, aarch64)
1210__OMP_TRAIT_PROPERTY(device, arch, aarch64_be)
1211__OMP_TRAIT_PROPERTY(device, arch, aarch64_32)
1212__OMP_TRAIT_PROPERTY(device, arch, ppc)
1213__OMP_TRAIT_PROPERTY(device, arch, ppcle)
1214__OMP_TRAIT_PROPERTY(device, arch, ppc64)
1215__OMP_TRAIT_PROPERTY(device, arch, ppc64le)
1216__OMP_TRAIT_PROPERTY(device, arch, x86)
1217__OMP_TRAIT_PROPERTY(device, arch, x86_64)
1218__OMP_TRAIT_PROPERTY(device, arch, amdgcn)
1219__OMP_TRAIT_PROPERTY(device, arch, nvptx)
1220__OMP_TRAIT_PROPERTY(device, arch, nvptx64)
1221
1222__OMP_TRAIT_SET(implementation)
1223
1224__OMP_TRAIT_SELECTOR(implementation, vendor, true)
1225
1226__OMP_TRAIT_PROPERTY(implementation, vendor, amd)
1227__OMP_TRAIT_PROPERTY(implementation, vendor, arm)
1228__OMP_TRAIT_PROPERTY(implementation, vendor, bsc)
1229__OMP_TRAIT_PROPERTY(implementation, vendor, cray)
1230__OMP_TRAIT_PROPERTY(implementation, vendor, fujitsu)
1231__OMP_TRAIT_PROPERTY(implementation, vendor, gnu)
1232__OMP_TRAIT_PROPERTY(implementation, vendor, ibm)
1233__OMP_TRAIT_PROPERTY(implementation, vendor, intel)
1234__OMP_TRAIT_PROPERTY(implementation, vendor, llvm)
1235__OMP_TRAIT_PROPERTY(implementation, vendor, nec)
1236__OMP_TRAIT_PROPERTY(implementation, vendor, nvidia)
1237__OMP_TRAIT_PROPERTY(implementation, vendor, pgi)
1238__OMP_TRAIT_PROPERTY(implementation, vendor, ti)
1239__OMP_TRAIT_PROPERTY(implementation, vendor, unknown)
1240
1241__OMP_TRAIT_SELECTOR(implementation, extension, true)
1242__OMP_TRAIT_PROPERTY(implementation, extension, match_all)
1243__OMP_TRAIT_PROPERTY(implementation, extension, match_any)
1244__OMP_TRAIT_PROPERTY(implementation, extension, match_none)
1245__OMP_TRAIT_PROPERTY(implementation, extension, disable_implicit_base)
1246__OMP_TRAIT_PROPERTY(implementation, extension, allow_templates)
1247__OMP_TRAIT_PROPERTY(implementation, extension, bind_to_declaration)
1248
1249__OMP_TRAIT_SET(user)
1250
1251__OMP_TRAIT_SELECTOR(user, condition, true)
1252
1253__OMP_TRAIT_PROPERTY(user, condition, true)
1254__OMP_TRAIT_PROPERTY(user, condition, false)
1255__OMP_TRAIT_PROPERTY(user, condition, unknown)
1256
1257__OMP_TRAIT_SELECTOR_AND_PROPERTY(construct, dispatch)
1258
1259// Note that we put isa last so that the other conditions are checked first.
1260// This allows us to issue warnings wrt. isa only if we match otherwise.
1261__OMP_TRAIT_SELECTOR(device, isa, true)
1262
1263// We use "__ANY" as a placeholder in the isa property to denote the
1264// conceptual "any", not the literal `any` used in kind. The string we
1265// we use is not important except that it will show up in diagnostics.
1266OMP_TRAIT_PROPERTY(device_isa___ANY, device, device_isa,
1267 "<any, entirely target dependent>")
1268
1269
1270#undef OMP_TRAIT_SET
1271#undef __OMP_TRAIT_SET
1272///}
1273
1274/// Traits for the requires directive
1275///
1276/// These will (potentially) become trait selectors for the OpenMP context if
1277/// the OMP_REQUIRES_TRAIT macro is not defined.
1278///
1279///{
1280
1281#ifdef OMP_REQUIRES_TRAIT
1282#define __OMP_REQUIRES_TRAIT(Name) \
1283 OMP_REQUIRES_TRAIT(OMP_REQUIRES_TRAIT_##Name, #Name)
1284#else
1285#define __OMP_REQUIRES_TRAIT(Name) \
1286 __OMP_TRAIT_SELECTOR_AND_PROPERTY(implementation, Name)
1287#endif
1288
1289__OMP_REQUIRES_TRAIT(unified_address)
1290__OMP_REQUIRES_TRAIT(unified_shared_memory)
1291__OMP_REQUIRES_TRAIT(reverse_offload)
1292__OMP_REQUIRES_TRAIT(dynamic_allocators)
1293__OMP_REQUIRES_TRAIT(atomic_default_mem_order)
1294
1295OMP_LAST_TRAIT_PROPERTY(
1296 implementation_atomic_default_mem_order_atomic_default_mem_order)
1297
1298#undef __OMP_TRAIT_SELECTOR_AND_PROPERTY
1299#undef OMP_TRAIT_SELECTOR
1300#undef __OMP_TRAIT_SELECTOR
1301#undef OMP_TRAIT_PROPERTY
1302#undef OMP_LAST_TRAIT_PROPERTY
1303#undef __OMP_TRAIT_PROPERTY
1304#undef __OMP_REQUIRES_TRAIT
1305#undef OMP_REQUIRES_TRAIT
1306///}
1307
1308
1309/// Assumption clauses
1310///
1311///{
1312
1313#ifdef OMP_ASSUME_CLAUSE
1314#define __OMP_ASSUME_CLAUSE(Identifier, StartsWith, HasDirectiveList, HasExpression) \
1315OMP_ASSUME_CLAUSE(Identifier, StartsWith, HasDirectiveList, HasExpression)
1316#else
1317#define __OMP_ASSUME_CLAUSE(...)
1318#endif
1319
1320__OMP_ASSUME_CLAUSE(llvm::StringLiteral("ext_"), true, false, false)
1321__OMP_ASSUME_CLAUSE(llvm::StringLiteral("absent"), false, true, false)
1322__OMP_ASSUME_CLAUSE(llvm::StringLiteral("contains"), false, true, false)
1323__OMP_ASSUME_CLAUSE(llvm::StringLiteral("holds"), false, false, true)
1324__OMP_ASSUME_CLAUSE(llvm::StringLiteral("no_openmp"), false, false, false)
1325__OMP_ASSUME_CLAUSE(llvm::StringLiteral("no_openmp_routines"), false, false, false)
1326__OMP_ASSUME_CLAUSE(llvm::StringLiteral("no_parallelism"), false, false, false)
1327
1328#undef __OMP_ASSUME_CLAUSE
1329#undef OMP_ASSUME_CLAUSE
1330///}
1331

source code of include/llvm-17/llvm/Frontend/OpenMP/OMPKinds.def