llvm/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def

//===--- OMPKinds.def - OpenMP directives, clauses, rt-calls -*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
/// \file
///
/// This file defines the list of supported OpenMP runtime
/// calls, and other things that need to be listed in enums.
///
/// This file is under transition to OMP.td with TableGen code generation.
///
//===----------------------------------------------------------------------===//

/// OpenMP Directives, combined directives and Clauses
/// - Moved to OMP.td

/// Types used in runtime structs or runtime functions
///
///{

#ifndef OMP_TYPE
#define OMP_TYPE(VarName, InitValue)
#endif

#define __OMP_TYPE(VarName) OMP_TYPE(VarName, Type::get##VarName##Ty(Ctx))
#define __OMP_PTR_TYPE(VarName) OMP_TYPE(VarName, PointerType::get(Ctx, 0))

__OMP_TYPE(Void)
__OMP_TYPE(Int1)
__OMP_TYPE(Int8)
__OMP_TYPE(Int16)
__OMP_TYPE(Int32)
__OMP_TYPE(Int64)
__OMP_PTR_TYPE(Int8Ptr)
__OMP_PTR_TYPE(Int16Ptr)
__OMP_PTR_TYPE(Int32Ptr)
__OMP_PTR_TYPE(Int64Ptr)
__OMP_TYPE(Double)

OMP_TYPE(SizeTy, M.getDataLayout().getIntPtrType(Ctx))
OMP_TYPE(Int63, Type::getIntNTy(Ctx, 63))

__OMP_PTR_TYPE(VoidPtr)
__OMP_PTR_TYPE(VoidPtrPtr)
__OMP_PTR_TYPE(VoidPtrPtrPtr)

__OMP_PTR_TYPE(Int8PtrPtr)
__OMP_PTR_TYPE(Int8PtrPtrPtr)

#undef __OMP_PTR_TYPE

#undef __OMP_TYPE
#undef OMP_TYPE

///}

/// array types
///
///{

#ifndef OMP_ARRAY_TYPE
#define OMP_ARRAY_TYPE(VarName, ElemTy, ArraySize)
#endif

#define __OMP_ARRAY_TYPE(VarName, ElemTy, ArraySize)                           \
  OMP_ARRAY_TYPE(VarName, ElemTy, ArraySize)

__OMP_ARRAY_TYPE(KmpCriticalName, Int32, 8)
__OMP_ARRAY_TYPE(Int32Arr3, Int32, 3)

#undef __OMP_ARRAY_TYPE
#undef OMP_ARRAY_TYPE

///}

/// Struct and function types
///
///{

#ifndef OMP_STRUCT_TYPE
#define OMP_STRUCT_TYPE(VarName, StructName, Packed, ...)
#endif

#define __OMP_STRUCT_TYPE(VarName, Name, Packed, ...)                                  \
  OMP_STRUCT_TYPE(VarName, "struct." #Name, Packed, __VA_ARGS__)

__OMP_STRUCT_TYPE(Ident, ident_t, false, Int32, Int32, Int32, Int32, Int8Ptr)
__OMP_STRUCT_TYPE(KernelArgs, __tgt_kernel_arguments, false, Int32, Int32, VoidPtrPtr,
		  VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr,
		  Int64, Int64, Int32Arr3Ty, Int32Arr3Ty, Int32)
__OMP_STRUCT_TYPE(AsyncInfo, __tgt_async_info, false, Int8Ptr)
__OMP_STRUCT_TYPE(DependInfo, kmp_dep_info, false, SizeTy, SizeTy, Int8)
__OMP_STRUCT_TYPE(Task, kmp_task_ompbuilder_t, false, VoidPtr, VoidPtr, Int32, VoidPtr, VoidPtr)
__OMP_STRUCT_TYPE(ConfigurationEnvironment, ConfigurationEnvironmentTy, false,
                  Int8, Int8, Int8, Int32, Int32, Int32, Int32, Int32, Int32)
__OMP_STRUCT_TYPE(DynamicEnvironment, DynamicEnvironmentTy, false, Int16)
__OMP_STRUCT_TYPE(KernelEnvironment, KernelEnvironmentTy, false,
                  ConfigurationEnvironment, IdentPtr, DynamicEnvironmentPtr)
__OMP_STRUCT_TYPE(KernelLaunchEnvironment, KernelLaunchEnvironmentTy, false,
                  Int32, Int32)

#undef __OMP_STRUCT_TYPE
#undef OMP_STRUCT_TYPE

#ifndef OMP_FUNCTION_TYPE
#define OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, ...)
#endif

#define __OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, ...)                \
  OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, __VA_ARGS__)

__OMP_FUNCTION_TYPE(ParallelTask, true, Void, Int32Ptr, Int32Ptr)
__OMP_FUNCTION_TYPE(ReduceFunction, false, Void, VoidPtr, VoidPtr)
__OMP_FUNCTION_TYPE(CopyFunction, false, Void, VoidPtr, VoidPtr)
__OMP_FUNCTION_TYPE(KmpcCtor, false, VoidPtr, VoidPtr)
__OMP_FUNCTION_TYPE(KmpcDtor, false, Void, VoidPtr)
__OMP_FUNCTION_TYPE(KmpcCopyCtor, false, VoidPtr, VoidPtr, VoidPtr)
__OMP_FUNCTION_TYPE(TaskRoutineEntry, false, Int32, Int32,
                    /* kmp_task_t */ VoidPtr)
__OMP_FUNCTION_TYPE(ShuffleReduce, false, Void, VoidPtr, Int16, Int16, Int16)
__OMP_FUNCTION_TYPE(InterWarpCopy, false, Void, VoidPtr, Int32)
__OMP_FUNCTION_TYPE(GlobalList, false, Void, VoidPtr, Int32, VoidPtr)

#undef __OMP_FUNCTION_TYPE
#undef OMP_FUNCTION_TYPE

///}

/// Internal Control Variables information
///
///{

#ifndef ICV_INIT_VALUE
#define ICV_INIT_VALUE(Enum, Name)
#endif

#define __ICV_INIT_VALUE(Name) ICV_INIT_VALUE(ICV_##Name, #Name)

__ICV_INIT_VALUE(ZERO)
__ICV_INIT_VALUE(FALSE)
__ICV_INIT_VALUE(IMPLEMENTATION_DEFINED)
__ICV_INIT_VALUE(LAST)

#undef __ICV_INIT_VALUE
#undef ICV_INIT_VALUE

#ifndef ICV_DATA_ENV
#define ICV_DATA_ENV(Enum, Name, EnvVarName, Init)
#endif

#define __ICV_DATA_ENV(Name, EnvVarName, Init)                                 \
  ICV_DATA_ENV(ICV_##Name, #Name, #EnvVarName, Init)

__ICV_DATA_ENV(nthreads, OMP_NUM_THREADS, ICV_IMPLEMENTATION_DEFINED)
__ICV_DATA_ENV(active_levels, NONE, ICV_ZERO)
__ICV_DATA_ENV(cancel, OMP_CANCELLATION, ICV_FALSE)
__ICV_DATA_ENV(proc_bind, OMP_PROC_BIND, ICV_IMPLEMENTATION_DEFINED)
__ICV_DATA_ENV(__last, last, ICV_LAST)

#undef __ICV_DATA_ENV
#undef ICV_DATA_ENV

#ifndef ICV_RT_SET
#define ICV_RT_SET(Name, RTL)
#endif

#define __ICV_RT_SET(Name, RTL) ICV_RT_SET(ICV_##Name, OMPRTL_##RTL)

__ICV_RT_SET(nthreads, omp_set_num_threads)

#undef __ICV_RT_SET
#undef ICV_RT_SET

#ifndef ICV_RT_GET
#define ICV_RT_GET(Name, RTL)
#endif

#define __ICV_RT_GET(Name, RTL) ICV_RT_GET(ICV_##Name, OMPRTL_##RTL)

__ICV_RT_GET(nthreads, omp_get_max_threads)
__ICV_RT_GET(active_levels, omp_get_active_level)
__ICV_RT_GET(cancel, omp_get_cancellation)
__ICV_RT_GET(proc_bind, omp_get_proc_bind)

#undef __ICV_RT_GET
#undef ICV_RT_GET

///}

/// Runtime library function (and their attributes)
///
///{

#ifndef OMP_RTL
#define OMP_RTL(Enum, Str, IsVarArg, ReturnType, ...)
#endif

#define __OMP_RTL(Name, IsVarArg, ReturnType, ...)                             \
  OMP_RTL(OMPRTL_##Name, #Name, IsVarArg, ReturnType, __VA_ARGS__)



__OMP_RTL(__kmpc_barrier, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_cancel, false, Int32, IdentPtr, Int32, Int32)
__OMP_RTL(__kmpc_cancel_barrier, false, Int32, IdentPtr, Int32)
__OMP_RTL(__kmpc_error, false, Void, IdentPtr, Int32, Int8Ptr)
__OMP_RTL(__kmpc_flush, false, Void, IdentPtr)
__OMP_RTL(__kmpc_global_thread_num, false, Int32, IdentPtr)
__OMP_RTL(__kmpc_get_hardware_thread_id_in_block, false, Int32, )
__OMP_RTL(__kmpc_fork_call, true, Void, IdentPtr, Int32, ParallelTaskPtr)
__OMP_RTL(__kmpc_fork_call_if, false, Void, IdentPtr, Int32, ParallelTaskPtr,
          Int32, VoidPtr)
__OMP_RTL(__kmpc_omp_taskwait, false, Int32, IdentPtr, Int32)
__OMP_RTL(__kmpc_omp_taskyield, false, Int32, IdentPtr, Int32, /* Int */ Int32)
__OMP_RTL(__kmpc_push_num_threads, false, Void, IdentPtr, Int32,
          /* Int */ Int32)
__OMP_RTL(__kmpc_push_proc_bind, false, Void, IdentPtr, Int32, /* Int */ Int32)
__OMP_RTL(__kmpc_omp_reg_task_with_affinity, false, Int32, IdentPtr, Int32,
          /* kmp_task_t */ VoidPtr, Int32,
          /* kmp_task_affinity_info_t */ VoidPtr)

__OMP_RTL(__kmpc_get_hardware_num_blocks, false, Int32, )
__OMP_RTL(__kmpc_get_hardware_num_threads_in_block, false, Int32, )
__OMP_RTL(__kmpc_get_warp_size, false, Int32, )

__OMP_RTL(omp_get_thread_num, false, Int32, )
__OMP_RTL(omp_get_num_threads, false, Int32, )
__OMP_RTL(omp_get_max_threads, false, Int32, )
__OMP_RTL(omp_in_parallel, false, Int32, )
__OMP_RTL(omp_get_dynamic, false, Int32, )
__OMP_RTL(omp_get_cancellation, false, Int32, )
__OMP_RTL(omp_get_nested, false, Int32, )
__OMP_RTL(omp_get_schedule, false, Void, Int32Ptr, Int32Ptr)
__OMP_RTL(omp_get_thread_limit, false, Int32, )
__OMP_RTL(omp_get_supported_active_levels, false, Int32, )
__OMP_RTL(omp_get_max_active_levels, false, Int32, )
__OMP_RTL(omp_get_level, false, Int32, )
__OMP_RTL(omp_get_ancestor_thread_num, false, Int32, Int32)
__OMP_RTL(omp_get_team_size, false, Int32, Int32)
__OMP_RTL(omp_get_active_level, false, Int32, )
__OMP_RTL(omp_in_final, false, Int32, )
__OMP_RTL(omp_get_proc_bind, false, Int32, )
__OMP_RTL(omp_get_num_places, false, Int32, )
__OMP_RTL(omp_get_num_procs, false, Int32, )
__OMP_RTL(omp_get_place_proc_ids, false, Void, Int32, Int32Ptr)
__OMP_RTL(omp_get_place_num, false, Int32, )
__OMP_RTL(omp_get_partition_num_places, false, Int32, )
__OMP_RTL(omp_get_partition_place_nums, false, Void, Int32Ptr)
__OMP_RTL(omp_get_wtime, false, Double,)

__OMP_RTL(omp_set_num_threads, false, Void, Int32)
__OMP_RTL(omp_set_dynamic, false, Void, Int32)
__OMP_RTL(omp_set_nested, false, Void, Int32)
__OMP_RTL(omp_set_schedule, false, Void, Int32, Int32)
__OMP_RTL(omp_set_max_active_levels, false, Void, Int32)

__OMP_RTL(__kmpc_master, false, Int32, IdentPtr, Int32)
__OMP_RTL(__kmpc_end_master, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_masked, false, Int32, IdentPtr, Int32, Int32)
__OMP_RTL(__kmpc_end_masked, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_critical, false, Void, IdentPtr, Int32, KmpCriticalNamePtrTy)
__OMP_RTL(__kmpc_critical_with_hint, false, Void, IdentPtr, Int32,
          KmpCriticalNamePtrTy, Int32)
__OMP_RTL(__kmpc_end_critical, false, Void, IdentPtr, Int32,
          KmpCriticalNamePtrTy)

__OMP_RTL(__kmpc_begin, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_end, false, Void, IdentPtr)

__OMP_RTL(__kmpc_reduce, false, Int32, IdentPtr, Int32, Int32, SizeTy, VoidPtr,
          ReduceFunctionPtr, KmpCriticalNamePtrTy)
__OMP_RTL(__kmpc_reduce_nowait, false, Int32, IdentPtr, Int32, Int32, SizeTy,
          VoidPtr, ReduceFunctionPtr, KmpCriticalNamePtrTy)
__OMP_RTL(__kmpc_end_reduce, false, Void, IdentPtr, Int32, KmpCriticalNamePtrTy)
__OMP_RTL(__kmpc_end_reduce_nowait, false, Void, IdentPtr, Int32,
          KmpCriticalNamePtrTy)

__OMP_RTL(__kmpc_ordered, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_end_ordered, false, Void, IdentPtr, Int32)

__OMP_RTL(__kmpc_for_static_init_4, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
__OMP_RTL(__kmpc_for_static_init_4u, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
__OMP_RTL(__kmpc_for_static_init_8, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
__OMP_RTL(__kmpc_for_static_init_8u, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
__OMP_RTL(__kmpc_for_static_fini, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_distribute_static_init_4, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
__OMP_RTL(__kmpc_distribute_static_init_4u, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
__OMP_RTL(__kmpc_distribute_static_init_8, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
__OMP_RTL(__kmpc_distribute_static_init_8u, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
__OMP_RTL(__kmpc_distribute_static_fini, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_dist_dispatch_init_4, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int32, Int32, Int32, Int32)
__OMP_RTL(__kmpc_dist_dispatch_init_4u, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int32, Int32, Int32, Int32)
__OMP_RTL(__kmpc_dist_dispatch_init_8, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int64, Int64, Int64, Int64)
__OMP_RTL(__kmpc_dist_dispatch_init_8u, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int64, Int64, Int64, Int64)
__OMP_RTL(__kmpc_dispatch_init_4, false, Void, IdentPtr, Int32, Int32, Int32,
          Int32, Int32, Int32)
__OMP_RTL(__kmpc_dispatch_init_4u, false, Void, IdentPtr, Int32, Int32, Int32,
          Int32, Int32, Int32)
__OMP_RTL(__kmpc_dispatch_init_8, false, Void, IdentPtr, Int32, Int32, Int64,
          Int64, Int64, Int64)
__OMP_RTL(__kmpc_dispatch_init_8u, false, Void, IdentPtr, Int32, Int32, Int64,
          Int64, Int64, Int64)
__OMP_RTL(__kmpc_dispatch_next_4, false, Int32, IdentPtr, Int32, Int32Ptr,
          Int32Ptr, Int32Ptr, Int32Ptr)
__OMP_RTL(__kmpc_dispatch_next_4u, false, Int32, IdentPtr, Int32, Int32Ptr,
          Int32Ptr, Int32Ptr, Int32Ptr)
__OMP_RTL(__kmpc_dispatch_next_8, false, Int32, IdentPtr, Int32, Int32Ptr,
          Int64Ptr, Int64Ptr, Int64Ptr)
__OMP_RTL(__kmpc_dispatch_next_8u, false, Int32, IdentPtr, Int32, Int32Ptr,
          Int64Ptr, Int64Ptr, Int64Ptr)
__OMP_RTL(__kmpc_dispatch_fini_4, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_dispatch_fini_4u, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_dispatch_fini_8, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_dispatch_fini_8u, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_dispatch_deinit, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_team_static_init_4, false, Void, IdentPtr, Int32, Int32Ptr,
          Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
__OMP_RTL(__kmpc_team_static_init_4u, false, Void, IdentPtr, Int32, Int32Ptr,
          Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
__OMP_RTL(__kmpc_team_static_init_8, false, Void, IdentPtr, Int32, Int32Ptr,
          Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
__OMP_RTL(__kmpc_team_static_init_8u, false, Void, IdentPtr, Int32, Int32Ptr,
          Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
__OMP_RTL(__kmpc_dist_for_static_init_4, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
__OMP_RTL(__kmpc_dist_for_static_init_4u, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32Ptr, Int32, Int32)
__OMP_RTL(__kmpc_dist_for_static_init_8, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)
__OMP_RTL(__kmpc_dist_for_static_init_8u, false, Void, IdentPtr, Int32, Int32,
          Int32Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64Ptr, Int64, Int64)

__OMP_RTL(__kmpc_single, false, Int32, IdentPtr, Int32)
__OMP_RTL(__kmpc_end_single, false, Void, IdentPtr, Int32)

__OMP_RTL(__kmpc_omp_task_alloc, false, /* kmp_task_t */ VoidPtr, IdentPtr,
          Int32, Int32, SizeTy, SizeTy, TaskRoutineEntryPtr)
__OMP_RTL(__kmpc_omp_task, false, Int32, IdentPtr, Int32,
          /* kmp_task_t */ VoidPtr)
__OMP_RTL(__kmpc_end_taskgroup, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_taskgroup, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_omp_task_begin_if0, false, Void, IdentPtr, Int32,
          /* kmp_task_t */ VoidPtr)
__OMP_RTL(__kmpc_omp_task_complete_if0, false, Void, IdentPtr, Int32,
          /* kmp_tasK_t */ VoidPtr)
__OMP_RTL(__kmpc_omp_task_with_deps, false, Int32, IdentPtr, Int32,
          /* kmp_task_t */ VoidPtr, Int32,
          /* kmp_depend_info_t */ VoidPtr, Int32,
          /* kmp_depend_info_t */ VoidPtr)
__OMP_RTL(__kmpc_taskloop, false, Void, IdentPtr, /* Int */ Int32, VoidPtr,
          /* Int */ Int32, Int64Ptr, Int64Ptr, Int64, /* Int */ Int32,
          /* Int */ Int32, Int64, VoidPtr)
__OMP_RTL(__kmpc_omp_target_task_alloc, false, /* kmp_task_t */ VoidPtr,
          IdentPtr, Int32, Int32, SizeTy, SizeTy, TaskRoutineEntryPtr, Int64)
__OMP_RTL(__kmpc_taskred_modifier_init, false, /* kmp_taskgroup */ VoidPtr,
          IdentPtr, /* Int */ Int32, /* Int */ Int32, /* Int */ Int32, VoidPtr)
__OMP_RTL(__kmpc_taskred_init, false, /* kmp_taskgroup */ VoidPtr,
          /* Int */ Int32, /* Int */ Int32, VoidPtr)
__OMP_RTL(__kmpc_task_reduction_modifier_fini, false, Void, IdentPtr,
          /* Int */ Int32, /* Int */ Int32)
__OMP_RTL(__kmpc_task_reduction_get_th_data, false, VoidPtr, Int32, VoidPtr,
          VoidPtr)
__OMP_RTL(__kmpc_task_reduction_init, false, VoidPtr, Int32, Int32, VoidPtr)
__OMP_RTL(__kmpc_task_reduction_modifier_init, false, VoidPtr, VoidPtr, Int32,
          Int32, Int32, VoidPtr)
__OMP_RTL(__kmpc_proxy_task_completed_ooo, false, Void, VoidPtr)

__OMP_RTL(__kmpc_omp_wait_deps, false, Void, IdentPtr, Int32, Int32,
          /* kmp_depend_info_t */ VoidPtr, Int32, VoidPtr)
__OMP_RTL(__kmpc_omp_taskwait_deps_51, false, Void, IdentPtr, Int32, Int32,
          /* kmp_depend_info_t */ VoidPtr, Int32, VoidPtr, Int32)
__OMP_RTL(__kmpc_cancellationpoint, false, Int32, IdentPtr, Int32, Int32)

__OMP_RTL(__kmpc_fork_teams, true, Void, IdentPtr, Int32, ParallelTaskPtr)
__OMP_RTL(__kmpc_push_num_teams, false, Void, IdentPtr, Int32, Int32, Int32)
__OMP_RTL(__kmpc_push_num_teams_51, false, Void, IdentPtr, Int32, Int32, Int32, Int32)
__OMP_RTL(__kmpc_set_thread_limit, false, Void, IdentPtr, Int32, Int32)

__OMP_RTL(__kmpc_copyprivate, false, Void, IdentPtr, Int32, SizeTy, VoidPtr,
          CopyFunctionPtr, Int32)
__OMP_RTL(__kmpc_threadprivate_cached, false, VoidPtr, IdentPtr, Int32, VoidPtr,
          SizeTy, VoidPtrPtrPtr)
__OMP_RTL(__kmpc_threadprivate_register, false, Void, IdentPtr, VoidPtr,
          KmpcCtorPtr, KmpcCopyCtorPtr, KmpcDtorPtr)

__OMP_RTL(__kmpc_doacross_init, false, Void, IdentPtr, Int32, Int32,
          /* kmp_dim */ VoidPtr)
__OMP_RTL(__kmpc_doacross_post, false, Void, IdentPtr, Int32, Int64Ptr)
__OMP_RTL(__kmpc_doacross_wait, false, Void, IdentPtr, Int32, Int64Ptr)
__OMP_RTL(__kmpc_doacross_fini, false, Void, IdentPtr, Int32)

__OMP_RTL(__kmpc_alloc, false, VoidPtr, /* Int */ Int32, SizeTy, VoidPtr)
__OMP_RTL(__kmpc_aligned_alloc, false, VoidPtr, /* Int */ Int32, SizeTy, SizeTy,
          VoidPtr)
__OMP_RTL(__kmpc_free, false, Void, /* Int */ Int32, VoidPtr, VoidPtr)

__OMP_RTL(__tgt_interop_init, false, Void, IdentPtr, Int32, VoidPtrPtr, Int32,
          Int32, Int32, VoidPtr, Int32)
__OMP_RTL(__tgt_interop_destroy, false, Void, IdentPtr, Int32, VoidPtrPtr,
          Int32, Int32, VoidPtr, Int32)
__OMP_RTL(__tgt_interop_use, false, Void, IdentPtr, Int32, VoidPtrPtr, Int32,
          Int32, VoidPtr, Int32)

__OMP_RTL(__kmpc_init_allocator, false, /* omp_allocator_handle_t */ VoidPtr,
          /* Int */ Int32, /* omp_memespace_handle_t */ VoidPtr,
          /* Int */ Int32, /* omp_alloctrait_t */ VoidPtr)
__OMP_RTL(__kmpc_destroy_allocator, false, Void, /* Int */ Int32,
          /* omp_allocator_handle_t */ VoidPtr)

__OMP_RTL(__kmpc_push_target_tripcount_mapper, false, Void, IdentPtr, Int64, Int64)
__OMP_RTL(__tgt_target_mapper, false, Int32, IdentPtr, Int64, VoidPtr, Int32, VoidPtrPtr,
          VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
__OMP_RTL(__tgt_target_nowait_mapper, false, Int32, IdentPtr, Int64, VoidPtr,
          Int32, VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr,
          VoidPtrPtr, Int32, VoidPtr, Int32, VoidPtr)
__OMP_RTL(__tgt_target_teams_mapper, false, Int32, IdentPtr, Int64, VoidPtr, Int32,
          VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr, Int32, Int32)
__OMP_RTL(__tgt_target_teams_nowait_mapper, false, Int32, IdentPtr, Int64,
          VoidPtr, Int32, VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr,
          VoidPtrPtr, VoidPtrPtr, Int32, Int32, Int32, VoidPtr, Int32, VoidPtr)
__OMP_RTL(__tgt_target_kernel, false, Int32, IdentPtr, Int64, Int32, Int32,
          VoidPtr, KernelArgsPtr)
__OMP_RTL(__tgt_target_kernel_nowait, false, Int32, IdentPtr, Int64, Int32,
          Int32, VoidPtr, KernelArgsPtr, Int32, VoidPtr, Int32, VoidPtr)
__OMP_RTL(__tgt_target_data_begin_mapper, false, Void, IdentPtr, Int64, Int32, VoidPtrPtr,
          VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
__OMP_RTL(__tgt_target_data_begin_nowait_mapper, false, Void, IdentPtr, Int64,
          Int32, VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr,
          VoidPtrPtr, Int32, VoidPtr, Int32, VoidPtr)
__OMP_RTL(__tgt_target_data_begin_mapper_issue, false, Void, IdentPtr, Int64, Int32,
          VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr, AsyncInfoPtr)
__OMP_RTL(__tgt_target_data_begin_mapper_wait, false, Void, Int64, AsyncInfoPtr)
__OMP_RTL(__tgt_target_data_end_mapper, false, Void, IdentPtr, Int64, Int32, VoidPtrPtr,
          VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
__OMP_RTL(__tgt_target_data_end_nowait_mapper, false, Void, IdentPtr, Int64,
          Int32, VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr,
          VoidPtrPtr, Int32, VoidPtr, Int32, VoidPtr)
__OMP_RTL(__tgt_target_data_update_mapper, false, Void, IdentPtr, Int64, Int32,
          VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr, VoidPtrPtr)
__OMP_RTL(__tgt_target_data_update_nowait_mapper, false, Void, IdentPtr, Int64,
          Int32, VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, VoidPtrPtr,
          VoidPtrPtr, Int32, VoidPtr, Int32, VoidPtr)
__OMP_RTL(__tgt_mapper_num_components, false, Int64, VoidPtr)
__OMP_RTL(__tgt_push_mapper_component, false, Void, VoidPtr, VoidPtr, VoidPtr,
          Int64, Int64, VoidPtr)
__OMP_RTL(__kmpc_task_allow_completion_event, false, VoidPtr, IdentPtr,
          /* Int */ Int32, /* kmp_task_t */ VoidPtr)

/// OpenMP Device runtime functions
__OMP_RTL(__kmpc_target_init, false, Int32, KernelEnvironmentPtr, KernelLaunchEnvironmentPtr)
__OMP_RTL(__kmpc_target_deinit, false, Void,)
__OMP_RTL(__kmpc_kernel_prepare_parallel, false, Void, VoidPtr)
__OMP_RTL(__kmpc_parallel_51, false, Void, IdentPtr, Int32, Int32, Int32, Int32,
          VoidPtr, VoidPtr, VoidPtrPtr, SizeTy)
__OMP_RTL(__kmpc_for_static_loop_4, false, Void, IdentPtr, VoidPtr, VoidPtr, Int32, Int32, Int32)
__OMP_RTL(__kmpc_for_static_loop_4u, false, Void, IdentPtr, VoidPtr, VoidPtr, Int32, Int32, Int32)
__OMP_RTL(__kmpc_for_static_loop_8, false, Void, IdentPtr, VoidPtr, VoidPtr, Int64, Int64, Int64)
__OMP_RTL(__kmpc_for_static_loop_8u, false, Void, IdentPtr, VoidPtr, VoidPtr, Int64, Int64, Int64)
__OMP_RTL(__kmpc_distribute_static_loop_4, false, Void, IdentPtr, VoidPtr, VoidPtr, Int32, Int32)
__OMP_RTL(__kmpc_distribute_static_loop_4u, false, Void, IdentPtr, VoidPtr, VoidPtr, Int32, Int32)
__OMP_RTL(__kmpc_distribute_static_loop_8, false, Void, IdentPtr, VoidPtr, VoidPtr, Int64, Int64)
__OMP_RTL(__kmpc_distribute_static_loop_8u, false, Void, IdentPtr, VoidPtr, VoidPtr, Int64, Int64)
__OMP_RTL(__kmpc_distribute_for_static_loop_4, false, Void, IdentPtr, VoidPtr, VoidPtr, Int32, Int32, Int32, Int32)
__OMP_RTL(__kmpc_distribute_for_static_loop_4u, false, Void, IdentPtr, VoidPtr, VoidPtr, Int32, Int32, Int32, Int32)
__OMP_RTL(__kmpc_distribute_for_static_loop_8, false, Void, IdentPtr, VoidPtr, VoidPtr, Int64, Int64, Int64, Int64)
__OMP_RTL(__kmpc_distribute_for_static_loop_8u, false, Void, IdentPtr, VoidPtr, VoidPtr, Int64, Int64, Int64, Int64)
__OMP_RTL(__kmpc_kernel_parallel, false, Int1, VoidPtrPtr)
__OMP_RTL(__kmpc_kernel_end_parallel, false, Void, )
__OMP_RTL(__kmpc_serialized_parallel, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_end_serialized_parallel, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_shuffle_int32, false, Int32, Int32, Int16, Int16)
__OMP_RTL(__kmpc_nvptx_parallel_reduce_nowait_v2, false, Int32, IdentPtr,
	  Int64, VoidPtr, ShuffleReducePtr, InterWarpCopyPtr)
__OMP_RTL(__kmpc_nvptx_teams_reduce_nowait_v2, false, Int32, IdentPtr,
          VoidPtr, Int32, Int64, VoidPtr, ShuffleReducePtr, InterWarpCopyPtr,
          GlobalListPtr, GlobalListPtr, GlobalListPtr, GlobalListPtr)
__OMP_RTL(__kmpc_reduction_get_fixed_buffer, false, VoidPtr, )

__OMP_RTL(__kmpc_shuffle_int64, false, Int64, Int64, Int16, Int16)

__OMP_RTL(__kmpc_alloc_shared, false, VoidPtr, SizeTy)
__OMP_RTL(__kmpc_free_shared, false, Void, VoidPtr, SizeTy)
__OMP_RTL(__kmpc_begin_sharing_variables, false, Void, VoidPtrPtrPtr, SizeTy)
__OMP_RTL(__kmpc_end_sharing_variables, false, Void, )
__OMP_RTL(__kmpc_get_shared_variables, false, Void, VoidPtrPtrPtr)
__OMP_RTL(__kmpc_parallel_level, false, Int16, IdentPtr, Int32)
__OMP_RTL(__kmpc_is_spmd_exec_mode, false, Int8, )
__OMP_RTL(__kmpc_barrier_simple_spmd, false, Void, IdentPtr, Int32)
__OMP_RTL(__kmpc_barrier_simple_generic, false, Void, IdentPtr, Int32)

__OMP_RTL(__kmpc_warp_active_thread_mask, false, Int64,)
__OMP_RTL(__kmpc_syncwarp, false, Void, Int64)

__OMP_RTL(__llvm_profile_register_function, false, Void, VoidPtr)
__OMP_RTL(__llvm_profile_register_names_function, false, Void, VoidPtr, Int64)

__OMP_RTL(__last, false, Void, )

#undef __OMP_RTL
#undef OMP_RTL

#define ParamAttrs(...) ArrayRef<AttributeSet>({}