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