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 | |
43 | OMP_TYPE(SizeTy, M.getDataLayout().getIntPtrType(Ctx)) |
44 | OMP_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. |
1226 | OMP_TRAIT_SET(invalid, "invalid" ) |
1227 | OMP_TRAIT_SELECTOR(invalid, invalid, "invalid" , false) |
1228 | OMP_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. |
1309 | OMP_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 | |
1338 | OMP_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) \ |
1358 | OMP_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 | |