mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:39:47 +00:00
[OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def
Summary: This changes Clang's generation of OpenMP runtime functions to use the types and functions defined in OpenMPKinds and OpenMPConstants. New OpenMP runtime function information should now be added to OMPKinds.def. This patch also changed the definitions of __kmpc_push_num_teams and __kmpc_copyprivate to match those found in the runtime. Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: jfb, AndreyChurbanov, openmp-commits, fghanim, hiraditya, sstefan1, cfe-commits, llvm-commits Tags: #openmp, #clang, #llvm Differential Revision: https://reviews.llvm.org/D80222
This commit is contained in:
parent
d40cd3b3ce
commit
76c68e0c0b
@ -39,7 +39,7 @@ public:
|
||||
void finalize();
|
||||
|
||||
/// Add attributes known for \p FnID to \p Fn.
|
||||
void addAttributes(omp::RuntimeFunction FnID, Function &Fn);
|
||||
static void addAttributes(omp::RuntimeFunction FnID, Function &Fn);
|
||||
|
||||
/// Type used throughout for insertion points.
|
||||
using InsertPointTy = IRBuilder<>::InsertPoint;
|
||||
@ -199,7 +199,10 @@ public:
|
||||
}
|
||||
|
||||
/// Return the function declaration for the runtime function with \p FnID.
|
||||
Function *getOrCreateRuntimeFunction(omp::RuntimeFunction FnID);
|
||||
static FunctionCallee getOrCreateRuntimeFunction(Module &M,
|
||||
omp::RuntimeFunction FnID);
|
||||
|
||||
Function *getOrCreateRuntimeFunctionPtr(omp::RuntimeFunction FnID);
|
||||
|
||||
/// Return the (LLVM-IR) string describing the source location \p LocStr.
|
||||
Constant *getOrCreateSrcLocStr(StringRef LocStr);
|
||||
|
@ -232,8 +232,23 @@ __OMP_IMPLICIT_CLAUSE_NO_CLASS(unknown, "unknown")
|
||||
__OMP_TYPE(Void)
|
||||
__OMP_TYPE(Int8)
|
||||
__OMP_TYPE(Int32)
|
||||
__OMP_TYPE(Int64)
|
||||
__OMP_TYPE(Int8Ptr)
|
||||
__OMP_TYPE(Int32Ptr)
|
||||
__OMP_TYPE(Int64Ptr)
|
||||
|
||||
OMP_TYPE(SizeTy, M.getDataLayout().getIntPtrType(Ctx))
|
||||
|
||||
#define __OMP_PTR_TYPE(NAME, BASE) OMP_TYPE(NAME, BASE->getPointerTo())
|
||||
|
||||
__OMP_PTR_TYPE(VoidPtr, Int8)
|
||||
__OMP_PTR_TYPE(VoidPtrPtr, VoidPtr)
|
||||
__OMP_PTR_TYPE(VoidPtrPtrPtr, VoidPtrPtr)
|
||||
|
||||
__OMP_PTR_TYPE(Int8PtrPtr, Int8Ptr)
|
||||
__OMP_PTR_TYPE(Int8PtrPtrPtr, Int8PtrPtr)
|
||||
|
||||
#undef __OMP_PTR_TYPE
|
||||
|
||||
#undef __OMP_TYPE
|
||||
#undef OMP_TYPE
|
||||
@ -282,6 +297,13 @@ __OMP_STRUCT_TYPE(Ident, ident_t, Int32, Int32, Int32, Int32, Int8Ptr)
|
||||
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)
|
||||
|
||||
#undef __OMP_FUNCTION_TYPE
|
||||
#undef OMP_FUNCTION_TYPE
|
||||
@ -299,6 +321,8 @@ __OMP_FUNCTION_TYPE(ParallelTask, true, Void, Int32Ptr, Int32Ptr)
|
||||
#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)
|
||||
@ -306,7 +330,7 @@ __OMP_RTL(__kmpc_flush, false, Void, IdentPtr)
|
||||
__OMP_RTL(__kmpc_global_thread_num, false, Int32, IdentPtr)
|
||||
__OMP_RTL(__kmpc_fork_call, true, Void, IdentPtr, Int32, ParallelTaskPtr)
|
||||
__OMP_RTL(__kmpc_omp_taskwait, false, Int32, IdentPtr, Int32)
|
||||
__OMP_RTL(__kmpc_omp_taskyield, false, Int32, IdentPtr, Int32, 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)
|
||||
@ -351,6 +375,167 @@ __OMP_RTL(__kmpc_critical_with_hint, false, Void, IdentPtr, 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_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_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, VoidPtr, IdentPtr,
|
||||
/* Int */ Int32, /* Int */ Int32, /* Int */ Int32, VoidPtr)
|
||||
__OMP_RTL(__kmpc_taskred_init, false, 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_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_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_free, false, Void, /* Int */ Int32, VoidPtr, VoidPtr)
|
||||
|
||||
__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, false, Void, Int64, Int64)
|
||||
__OMP_RTL(__tgt_target, false, Int32, Int64, VoidPtr, Int32, VoidPtrPtr,
|
||||
VoidPtrPtr, Int64Ptr, Int64Ptr)
|
||||
__OMP_RTL(__tgt_target_nowait, false, Int32, Int64, VoidPtr, Int32, VoidPtrPtr,
|
||||
VoidPtrPtr, Int64Ptr, Int64Ptr)
|
||||
__OMP_RTL(__tgt_target_teams, false, Int32, Int64, VoidPtr, Int32, VoidPtrPtr,
|
||||
VoidPtrPtr, Int64Ptr, Int64Ptr, Int32, Int32)
|
||||
__OMP_RTL(__tgt_target_teams_nowait, false, Int32, Int64, VoidPtr, Int32,
|
||||
VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr, Int32, Int32)
|
||||
__OMP_RTL(__tgt_register_requires, false, Void, Int64)
|
||||
__OMP_RTL(__tgt_target_data_begin, false, Void, Int64, Int32, VoidPtrPtr,
|
||||
VoidPtrPtr, Int64Ptr, Int64Ptr)
|
||||
__OMP_RTL(__tgt_target_data_begin_nowait, false, Void, Int64, Int32, VoidPtrPtr,
|
||||
VoidPtrPtr, Int64Ptr, Int64Ptr)
|
||||
__OMP_RTL(__tgt_target_data_end, false, Void, Int64, Int32, VoidPtrPtr,
|
||||
VoidPtrPtr, Int64Ptr, Int64Ptr)
|
||||
__OMP_RTL(__tgt_target_data_end_nowait, false, Void, Int64, Int32, VoidPtrPtr,
|
||||
VoidPtrPtr, Int64Ptr, Int64Ptr)
|
||||
__OMP_RTL(__tgt_target_data_update, false, Void, Int64, Int32, VoidPtrPtr,
|
||||
VoidPtrPtr, Int64Ptr, Int64Ptr)
|
||||
__OMP_RTL(__tgt_target_data_update_nowait, false, Void, Int64, Int32,
|
||||
VoidPtrPtr, VoidPtrPtr, Int64Ptr, Int64Ptr)
|
||||
__OMP_RTL(__tgt_mapper_num_components, false, Int64, VoidPtr)
|
||||
__OMP_RTL(__tgt_push_mapper_component, false, Void, VoidPtr, VoidPtr, VoidPtr,
|
||||
Int64, Int64)
|
||||
__OMP_RTL(__kmpc_task_allow_completion_event, false, VoidPtr, IdentPtr,
|
||||
/* Int */ Int32, /* kmp_task_t */ VoidPtr)
|
||||
|
||||
__OMP_RTL(__last, false, Void, )
|
||||
|
||||
#undef __OMP_RTL
|
||||
@ -471,6 +656,212 @@ __OMP_RTL_ATTRS(__kmpc_end_critical,
|
||||
AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_begin, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_end, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_reduce, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_reduce_nowait, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_end_reduce, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_end_reduce_nowait, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_ordered, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_end_ordered, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_for_static_init_4, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_for_static_init_4u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_for_static_init_8, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_for_static_init_8u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_for_static_fini, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dist_dispatch_init_4, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dist_dispatch_init_4u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dist_dispatch_init_8, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dist_dispatch_init_8u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_init_4, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_init_4u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_init_8, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_init_8u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_next_4, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_next_4u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_next_8, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_next_8u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_fini_4, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_fini_4u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_fini_8, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dispatch_fini_8u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_team_static_init_4, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_team_static_init_4u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_team_static_init_8, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_team_static_init_8u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dist_for_static_init_4, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dist_for_static_init_4u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dist_for_static_init_8, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_dist_for_static_init_8u, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_single, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_end_single, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_omp_task_alloc, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_omp_task, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_end_taskgroup, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_taskgroup, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_omp_task_begin_if0, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_omp_task_complete_if0, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_omp_task_with_deps, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_taskloop, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_omp_target_task_alloc,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_taskred_modifier_init,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_taskred_init,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_task_reduction_modifier_fini,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_task_reduction_get_th_data,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_task_reduction_init,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_task_reduction_modifier_init,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_proxy_task_completed_ooo,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_omp_wait_deps, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_cancellationpoint, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_fork_teams, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_push_num_teams, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_copyprivate, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_threadprivate_cached, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_threadprivate_register, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_doacross_init, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_doacross_post, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_doacross_wait, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_doacross_fini, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_alloc, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_free, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_init_allocator, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_destroy_allocator, AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
__OMP_RTL_ATTRS(__kmpc_push_target_tripcount,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target_nowait,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target_teams,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target_teams_nowait,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_register_requires,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target_data_begin,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target_data_begin_nowait,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target_data_end,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target_data_end_nowait,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target_data_update,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_target_data_update_nowait,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_mapper_num_components,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__tgt_push_mapper_component,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
__OMP_RTL_ATTRS(__kmpc_task_allow_completion_event,
|
||||
AttributeSet(EnumAttr(NoUnwind)),
|
||||
AttributeSet(), {})
|
||||
|
||||
#undef __OMP_RTL_ATTRS
|
||||
#undef OMP_RTL_ATTRS
|
||||
#undef AttributeSet
|
||||
|
@ -59,13 +59,17 @@ void OpenMPIRBuilder::addAttributes(omp::RuntimeFunction FnID, Function &Fn) {
|
||||
}
|
||||
}
|
||||
|
||||
Function *OpenMPIRBuilder::getOrCreateRuntimeFunction(RuntimeFunction FnID) {
|
||||
FunctionCallee
|
||||
OpenMPIRBuilder::getOrCreateRuntimeFunction(Module &M, RuntimeFunction FnID) {
|
||||
FunctionType *FnTy = nullptr;
|
||||
Function *Fn = nullptr;
|
||||
|
||||
// Try to find the declation in the module first.
|
||||
switch (FnID) {
|
||||
#define OMP_RTL(Enum, Str, IsVarArg, ReturnType, ...) \
|
||||
case Enum: \
|
||||
FnTy = FunctionType::get(ReturnType, ArrayRef<Type *>{__VA_ARGS__}, \
|
||||
IsVarArg); \
|
||||
Fn = M.getFunction(Str); \
|
||||
break;
|
||||
#include "llvm/Frontend/OpenMP/OMPKinds.def"
|
||||
@ -74,20 +78,50 @@ Function *OpenMPIRBuilder::getOrCreateRuntimeFunction(RuntimeFunction FnID) {
|
||||
if (!Fn) {
|
||||
// Create a new declaration if we need one.
|
||||
switch (FnID) {
|
||||
#define OMP_RTL(Enum, Str, IsVarArg, ReturnType, ...) \
|
||||
#define OMP_RTL(Enum, Str, ...) \
|
||||
case Enum: \
|
||||
Fn = Function::Create(FunctionType::get(ReturnType, \
|
||||
ArrayRef<Type *>{__VA_ARGS__}, \
|
||||
IsVarArg), \
|
||||
GlobalValue::ExternalLinkage, Str, M); \
|
||||
Fn = Function::Create(FnTy, GlobalValue::ExternalLinkage, Str, M); \
|
||||
break;
|
||||
#include "llvm/Frontend/OpenMP/OMPKinds.def"
|
||||
}
|
||||
|
||||
// Add information if the runtime function takes a callback function
|
||||
if (FnID == OMPRTL___kmpc_fork_call || FnID == OMPRTL___kmpc_fork_teams) {
|
||||
if (!Fn->hasMetadata(LLVMContext::MD_callback)) {
|
||||
LLVMContext &Ctx = Fn->getContext();
|
||||
MDBuilder MDB(Ctx);
|
||||
// Annotate the callback behavior of the runtime function:
|
||||
// - The callback callee is argument number 2 (microtask).
|
||||
// - The first two arguments of the callback callee are unknown (-1).
|
||||
// - All variadic arguments to the runtime function are passed to the
|
||||
// callback callee.
|
||||
Fn->addMetadata(
|
||||
LLVMContext::MD_callback,
|
||||
*MDNode::get(Ctx, {MDB.createCallbackEncoding(
|
||||
2, {-1, -1}, /* VarArgsArePassed */ true)}));
|
||||
}
|
||||
}
|
||||
|
||||
LLVM_DEBUG(dbgs() << "Created OpenMP runtime function " << Fn->getName()
|
||||
<< " with type " << *Fn->getFunctionType() << "\n");
|
||||
addAttributes(FnID, *Fn);
|
||||
|
||||
} else {
|
||||
LLVM_DEBUG(dbgs() << "Found OpenMP runtime function " << Fn->getName()
|
||||
<< " with type " << *Fn->getFunctionType() << "\n");
|
||||
}
|
||||
|
||||
assert(Fn && "Failed to create OpenMP runtime function");
|
||||
|
||||
// Cast the function to the expected type if necessary
|
||||
Constant *C = ConstantExpr::getBitCast(Fn, FnTy->getPointerTo());
|
||||
return {FnTy, C};
|
||||
}
|
||||
|
||||
Function *OpenMPIRBuilder::getOrCreateRuntimeFunctionPtr(RuntimeFunction FnID) {
|
||||
FunctionCallee RTLFn = getOrCreateRuntimeFunction(M, FnID);
|
||||
auto *Fn = dyn_cast<llvm::Function>(RTLFn.getCallee());
|
||||
assert(Fn && "Failed to create OpenMP runtime function pointer");
|
||||
return Fn;
|
||||
}
|
||||
|
||||
@ -218,7 +252,7 @@ OpenMPIRBuilder::getOrCreateSrcLocStr(const LocationDescription &Loc) {
|
||||
|
||||
Value *OpenMPIRBuilder::getOrCreateThreadID(Value *Ident) {
|
||||
return Builder.CreateCall(
|
||||
getOrCreateRuntimeFunction(OMPRTL___kmpc_global_thread_num), Ident,
|
||||
getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_global_thread_num), Ident,
|
||||
"omp_global_thread_num");
|
||||
}
|
||||
|
||||
@ -265,10 +299,11 @@ OpenMPIRBuilder::emitBarrierImpl(const LocationDescription &Loc, Directive Kind,
|
||||
bool UseCancelBarrier =
|
||||
!ForceSimpleCall && isLastFinalizationInfoCancellable(OMPD_parallel);
|
||||
|
||||
Value *Result = Builder.CreateCall(
|
||||
getOrCreateRuntimeFunction(UseCancelBarrier ? OMPRTL___kmpc_cancel_barrier
|
||||
: OMPRTL___kmpc_barrier),
|
||||
Args);
|
||||
Value *Result =
|
||||
Builder.CreateCall(getOrCreateRuntimeFunctionPtr(
|
||||
UseCancelBarrier ? OMPRTL___kmpc_cancel_barrier
|
||||
: OMPRTL___kmpc_barrier),
|
||||
Args);
|
||||
|
||||
if (UseCancelBarrier && CheckCancelFlag)
|
||||
emitCancelationCheckImpl(Result, OMPD_parallel);
|
||||
@ -306,7 +341,7 @@ OpenMPIRBuilder::CreateCancel(const LocationDescription &Loc,
|
||||
Value *Ident = getOrCreateIdent(SrcLocStr);
|
||||
Value *Args[] = {Ident, getOrCreateThreadID(Ident), CancelKind};
|
||||
Value *Result = Builder.CreateCall(
|
||||
getOrCreateRuntimeFunction(OMPRTL___kmpc_cancel), Args);
|
||||
getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_cancel), Args);
|
||||
|
||||
// The actual cancel logic is shared with others, e.g., cancel_barriers.
|
||||
emitCancelationCheckImpl(Result, CanceledDirective);
|
||||
@ -371,7 +406,7 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::CreateParallel(
|
||||
Ident, ThreadID,
|
||||
Builder.CreateIntCast(NumThreads, Int32, /*isSigned*/ false)};
|
||||
Builder.CreateCall(
|
||||
getOrCreateRuntimeFunction(OMPRTL___kmpc_push_num_threads), Args);
|
||||
getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_push_num_threads), Args);
|
||||
}
|
||||
|
||||
if (ProcBind != OMP_PROC_BIND_default) {
|
||||
@ -379,8 +414,8 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::CreateParallel(
|
||||
Value *Args[] = {
|
||||
Ident, ThreadID,
|
||||
ConstantInt::get(Int32, unsigned(ProcBind), /*isSigned=*/true)};
|
||||
Builder.CreateCall(getOrCreateRuntimeFunction(OMPRTL___kmpc_push_proc_bind),
|
||||
Args);
|
||||
Builder.CreateCall(
|
||||
getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_push_proc_bind), Args);
|
||||
}
|
||||
|
||||
BasicBlock *InsertBB = Builder.GetInsertBlock();
|
||||
@ -477,7 +512,7 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::CreateParallel(
|
||||
|
||||
LLVM_DEBUG(dbgs() << "After body codegen: " << *OuterFn << "\n");
|
||||
|
||||
FunctionCallee RTLFn = getOrCreateRuntimeFunction(OMPRTL___kmpc_fork_call);
|
||||
FunctionCallee RTLFn = getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_fork_call);
|
||||
if (auto *F = dyn_cast<llvm::Function>(RTLFn.getCallee())) {
|
||||
if (!F->hasMetadata(llvm::LLVMContext::MD_callback)) {
|
||||
llvm::LLVMContext &Ctx = F->getContext();
|
||||
@ -546,7 +581,7 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::CreateParallel(
|
||||
// Build calls __kmpc_serialized_parallel(&Ident, GTid);
|
||||
Value *SerializedParallelCallArgs[] = {Ident, ThreadID};
|
||||
Builder.CreateCall(
|
||||
getOrCreateRuntimeFunction(OMPRTL___kmpc_serialized_parallel),
|
||||
getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_serialized_parallel),
|
||||
SerializedParallelCallArgs);
|
||||
|
||||
// OutlinedFn(>id, &zero, CapturedStruct);
|
||||
@ -556,7 +591,7 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::CreateParallel(
|
||||
// __kmpc_end_serialized_parallel(&Ident, GTid);
|
||||
Value *EndArgs[] = {Ident, ThreadID};
|
||||
Builder.CreateCall(
|
||||
getOrCreateRuntimeFunction(OMPRTL___kmpc_end_serialized_parallel),
|
||||
getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_end_serialized_parallel),
|
||||
EndArgs);
|
||||
|
||||
LLVM_DEBUG(dbgs() << "With serialized parallel region: "
|
||||
@ -625,7 +660,7 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::CreateParallel(
|
||||
LLVM_DEBUG(dbgs() << "Before privatization: " << *OuterFn << "\n");
|
||||
|
||||
FunctionCallee TIDRTLFn =
|
||||
getOrCreateRuntimeFunction(OMPRTL___kmpc_global_thread_num);
|
||||
getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_global_thread_num);
|
||||
|
||||
auto PrivHelper = [&](Value &V) {
|
||||
if (&V == TIDAddr || &V == ZeroAddr)
|
||||
@ -681,7 +716,7 @@ void OpenMPIRBuilder::emitFlush(const LocationDescription &Loc) {
|
||||
Constant *SrcLocStr = getOrCreateSrcLocStr(Loc);
|
||||
Value *Args[] = {getOrCreateIdent(SrcLocStr)};
|
||||
|
||||
Builder.CreateCall(getOrCreateRuntimeFunction(OMPRTL___kmpc_flush), Args);
|
||||
Builder.CreateCall(getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_flush), Args);
|
||||
}
|
||||
|
||||
void OpenMPIRBuilder::CreateFlush(const LocationDescription &Loc) {
|
||||
@ -698,7 +733,7 @@ void OpenMPIRBuilder::emitTaskwaitImpl(const LocationDescription &Loc) {
|
||||
Value *Args[] = {Ident, getOrCreateThreadID(Ident)};
|
||||
|
||||
// Ignore return result until untied tasks are supported.
|
||||
Builder.CreateCall(getOrCreateRuntimeFunction(OMPRTL___kmpc_omp_taskwait),
|
||||
Builder.CreateCall(getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_omp_taskwait),
|
||||
Args);
|
||||
}
|
||||
|
||||
@ -715,7 +750,7 @@ void OpenMPIRBuilder::emitTaskyieldImpl(const LocationDescription &Loc) {
|
||||
Constant *I32Null = ConstantInt::getNullValue(Int32);
|
||||
Value *Args[] = {Ident, getOrCreateThreadID(Ident), I32Null};
|
||||
|
||||
Builder.CreateCall(getOrCreateRuntimeFunction(OMPRTL___kmpc_omp_taskyield),
|
||||
Builder.CreateCall(getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_omp_taskyield),
|
||||
Args);
|
||||
}
|
||||
|
||||
@ -739,10 +774,10 @@ OpenMPIRBuilder::CreateMaster(const LocationDescription &Loc,
|
||||
Value *ThreadId = getOrCreateThreadID(Ident);
|
||||
Value *Args[] = {Ident, ThreadId};
|
||||
|
||||
Function *EntryRTLFn = getOrCreateRuntimeFunction(OMPRTL___kmpc_master);
|
||||
Function *EntryRTLFn = getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_master);
|
||||
Instruction *EntryCall = Builder.CreateCall(EntryRTLFn, Args);
|
||||
|
||||
Function *ExitRTLFn = getOrCreateRuntimeFunction(OMPRTL___kmpc_end_master);
|
||||
Function *ExitRTLFn = getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_end_master);
|
||||
Instruction *ExitCall = Builder.CreateCall(ExitRTLFn, Args);
|
||||
|
||||
return EmitOMPInlinedRegion(OMPD, EntryCall, ExitCall, BodyGenCB, FiniCB,
|
||||
@ -768,13 +803,14 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::CreateCritical(
|
||||
if (HintInst) {
|
||||
// Add Hint to entry Args and create call
|
||||
EnterArgs.push_back(HintInst);
|
||||
RTFn = getOrCreateRuntimeFunction(OMPRTL___kmpc_critical_with_hint);
|
||||
RTFn = getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_critical_with_hint);
|
||||
} else {
|
||||
RTFn = getOrCreateRuntimeFunction(OMPRTL___kmpc_critical);
|
||||
RTFn = getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_critical);
|
||||
}
|
||||
Instruction *EntryCall = Builder.CreateCall(RTFn, EnterArgs);
|
||||
|
||||
Function *ExitRTLFn = getOrCreateRuntimeFunction(OMPRTL___kmpc_end_critical);
|
||||
Function *ExitRTLFn =
|
||||
getOrCreateRuntimeFunctionPtr(OMPRTL___kmpc_end_critical);
|
||||
Instruction *ExitCall = Builder.CreateCall(ExitRTLFn, Args);
|
||||
|
||||
return EmitOMPInlinedRegion(OMPD, EntryCall, ExitCall, BodyGenCB, FiniCB,
|
||||
|
@ -495,6 +495,174 @@ declare void @__kmpc_critical_with_hint(%struct.ident_t*, i32, [8 x i32]*, i32)
|
||||
|
||||
declare void @__kmpc_end_critical(%struct.ident_t*, i32, [8 x i32]*)
|
||||
|
||||
declare void @__kmpc_begin(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_end(%struct.ident_t*)
|
||||
|
||||
declare i32 @__kmpc_reduce(%struct.ident_t*, i32, i32, i64, i8*, void (i8*, i8*)*, [8 x i32]*)
|
||||
|
||||
declare i32 @__kmpc_reduce_nowait(%struct.ident_t*, i32, i32, i64, i8*, void (i8*, i8*)*, [8 x i32]*)
|
||||
|
||||
declare void @__kmpc_end_reduce(%struct.ident_t*, i32, [8 x i32]*)
|
||||
|
||||
declare void @__kmpc_end_reduce_nowait(%struct.ident_t*, i32, [8 x i32]*)
|
||||
|
||||
declare void @__kmpc_ordered(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_end_ordered(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_for_static_init_4(%struct.ident_t*, i32, i32, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
declare void @__kmpc_for_static_init_4u(%struct.ident_t*, i32, i32, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
declare void @__kmpc_for_static_init_8(%struct.ident_t*, i32, i32, i32*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
declare void @__kmpc_for_static_init_8u(%struct.ident_t*, i32, i32, i32*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
declare void @__kmpc_for_static_fini(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_team_static_init_4(%struct.ident_t*, i32, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
declare void @__kmpc_team_static_init_4u(%struct.ident_t*, i32, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
declare void @__kmpc_team_static_init_8(%struct.ident_t*, i32, i32*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
declare void @__kmpc_team_static_init_8u(%struct.ident_t*, i32, i32*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
declare void @__kmpc_dist_for_static_init_4(%struct.ident_t*, i32, i32, i32*, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
declare void @__kmpc_dist_for_static_init_4u(%struct.ident_t*, i32, i32, i32*, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
declare void @__kmpc_dist_for_static_init_8(%struct.ident_t*, i32, i32, i32*, i64*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
declare void @__kmpc_dist_for_static_init_8u(%struct.ident_t*, i32, i32, i32*, i64*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
declare i32 @__kmpc_single(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_end_single(%struct.ident_t*, i32)
|
||||
|
||||
declare i8* @__kmpc_omp_task_alloc(%struct.ident_t*, i32, i32, i64, i64, i32 (i32, i8*)*)
|
||||
|
||||
declare i32 @__kmpc_omp_task(%struct.ident_t*, i32, i8*)
|
||||
|
||||
declare void @__kmpc_end_taskgroup(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_taskgroup(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_dist_dispatch_init_4(%struct.ident_t*, i32, i32, i32*, i32, i32, i32, i32)
|
||||
|
||||
declare void @__kmpc_dist_dispatch_init_4u(%struct.ident_t*, i32, i32, i32*, i32, i32, i32, i32)
|
||||
|
||||
declare void @__kmpc_dist_dispatch_init_8(%struct.ident_t*, i32, i32, i32*, i64, i64, i64, i64)
|
||||
|
||||
declare void @__kmpc_dist_dispatch_init_8u(%struct.ident_t*, i32, i32, i32*, i64, i64, i64, i64)
|
||||
|
||||
declare void @__kmpc_dispatch_init_4(%struct.ident_t*, i32, i32, i32, i32, i32, i32)
|
||||
|
||||
declare void @__kmpc_dispatch_init_4u(%struct.ident_t*, i32, i32, i32, i32, i32, i32)
|
||||
|
||||
declare void @__kmpc_dispatch_init_8(%struct.ident_t*, i32, i32, i64, i64, i64, i64)
|
||||
|
||||
declare void @__kmpc_dispatch_init_8u(%struct.ident_t*, i32, i32, i64, i64, i64, i64)
|
||||
|
||||
declare i32 @__kmpc_dispatch_next_4(%struct.ident_t*, i32, i32*, i32*, i32*, i32*)
|
||||
|
||||
declare i32 @__kmpc_dispatch_next_4u(%struct.ident_t*, i32, i32*, i32*, i32*, i32*)
|
||||
|
||||
declare i32 @__kmpc_dispatch_next_8(%struct.ident_t*, i32, i32*, i64*, i64*, i64*)
|
||||
|
||||
declare i32 @__kmpc_dispatch_next_8u(%struct.ident_t*, i32, i32*, i64*, i64*, i64*)
|
||||
|
||||
declare void @__kmpc_dispatch_fini_4(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_dispatch_fini_4u(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_dispatch_fini_8(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_dispatch_fini_8u(%struct.ident_t*, i32)
|
||||
|
||||
declare void @__kmpc_omp_task_begin_if0(%struct.ident_t*, i32, i8*)
|
||||
|
||||
declare void @__kmpc_omp_task_complete_if0(%struct.ident_t*, i32, i8*)
|
||||
|
||||
declare i32 @__kmpc_omp_task_with_deps(%struct.ident_t*, i32, i8*, i32, i8*, i32, i8*)
|
||||
|
||||
declare void @__kmpc_omp_wait_deps(%struct.ident_t*, i32, i32, i8*, i32, i8*)
|
||||
|
||||
declare i32 @__kmpc_cancellationpoint(%struct.ident_t*, i32, i32)
|
||||
|
||||
declare void @__kmpc_push_num_teams(%struct.ident_t*, i32, i32, i32)
|
||||
|
||||
declare void @__kmpc_fork_teams(%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...)
|
||||
|
||||
declare void @__kmpc_taskloop(%struct.ident_t*, i32, i8*, i32, i64*, i64*, i64, i32, i32, i64, i8*)
|
||||
|
||||
declare i8* @__kmpc_omp_target_task_alloc(%struct.ident_t*, i32, i32, i64, i64, i32 (i32, i8*)*, i64)
|
||||
|
||||
declare i8* @__kmpc_taskred_modifier_init(%struct.ident_t*, i32, i32, i32, i8*)
|
||||
|
||||
declare i8* @__kmpc_taskred_init(i32, i32, i8*)
|
||||
|
||||
declare void @__kmpc_task_reduction_modifier_fini(%struct.ident_t*, i32, i32)
|
||||
|
||||
declare void @__kmpc_copyprivate(%struct.ident_t*, i32, i64, i8*, void (i8*, i8*)*, i32)
|
||||
|
||||
declare i8* @__kmpc_threadprivate_cached(%struct.ident_t*, i32, i8*, i64, i8***)
|
||||
|
||||
declare void @__kmpc_threadprivate_register(%struct.ident_t*, i8*, i8* (i8*)*, i8* (i8*, i8*)*, void (i8*)*)
|
||||
|
||||
declare void @__kmpc_doacross_init(%struct.ident_t*, i32, i32, i8*)
|
||||
|
||||
declare void @__kmpc_doacross_wait(%struct.ident_t*, i32, i64*)
|
||||
|
||||
declare void @__kmpc_doacross_post(%struct.ident_t*, i32, i64*)
|
||||
|
||||
declare void @__kmpc_doacross_fini(%struct.ident_t*, i32)
|
||||
|
||||
declare i8* @__kmpc_alloc(i32, i64, i8*)
|
||||
|
||||
declare void @__kmpc_free(i32, i8*, i8*)
|
||||
|
||||
declare i8* @__kmpc_init_allocator(i32, i8*, i32, i8*)
|
||||
|
||||
declare void @__kmpc_destroy_allocator(i32, i8*)
|
||||
|
||||
declare void @__kmpc_push_target_tripcount(i64, i64)
|
||||
|
||||
declare i32 @__tgt_target(i64, i8*, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
declare i32 @__tgt_target_nowait(i64, i8*, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
declare i32 @__tgt_target_teams(i64, i8*, i32, i8**, i8**, i64*, i64*, i32, i32)
|
||||
|
||||
declare void @__tgt_register_requires(i64)
|
||||
|
||||
declare void @__tgt_target_data_begin(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
declare void @__tgt_target_data_begin_nowait(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
declare void @__tgt_target_data_end(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
declare void @__tgt_target_data_end_nowait(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
declare void @__tgt_target_data_update(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
declare void @__tgt_target_data_update_nowait(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
declare i64 @__tgt_mapper_num_components(i8*)
|
||||
|
||||
declare void @__tgt_push_mapper_component(i8*, i8*, i8*, i64, i64)
|
||||
|
||||
declare i8* @__kmpc_task_allow_completion_event(%struct.ident_t*, i32, i8*)
|
||||
|
||||
declare i8* @__kmpc_task_reduction_get_th_data(i32, i8*, i8*)
|
||||
|
||||
declare i8* @__kmpc_task_reduction_init(i32, i32, i8*)
|
||||
|
||||
declare i8* @__kmpc_task_reduction_modifier_init(i8*, i32, i32, i32, i8*)
|
||||
|
||||
declare void @__kmpc_proxy_task_completed_ooo(i8*)
|
||||
|
||||
; CHECK: ; Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare dso_local void @omp_set_num_threads(i32)
|
||||
|
||||
@ -771,6 +939,258 @@ declare void @__kmpc_end_critical(%struct.ident_t*, i32, [8 x i32]*)
|
||||
; CHECK: Function Attrs: inaccessiblemem_or_argmemonly
|
||||
; CHECK-NEXT: declare void @__kmpc_end_critical(%struct.ident_t*, i32, [8 x i32]*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_begin(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_end(%struct.ident_t*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_reduce(%struct.ident_t*, i32, i32, i64, i8*, void (i8*, i8*)*, [8 x i32]*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_reduce_nowait(%struct.ident_t*, i32, i32, i64, i8*, void (i8*, i8*)*, [8 x i32]*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_end_reduce(%struct.ident_t*, i32, [8 x i32]*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_end_reduce_nowait(%struct.ident_t*, i32, [8 x i32]*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_ordered(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_end_ordered(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_for_static_init_4(%struct.ident_t*, i32, i32, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_for_static_init_4u(%struct.ident_t*, i32, i32, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_for_static_init_8(%struct.ident_t*, i32, i32, i32*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_for_static_init_8u(%struct.ident_t*, i32, i32, i32*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_for_static_fini(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_team_static_init_4(%struct.ident_t*, i32, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_team_static_init_4u(%struct.ident_t*, i32, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_team_static_init_8(%struct.ident_t*, i32, i32*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_team_static_init_8u(%struct.ident_t*, i32, i32*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dist_for_static_init_4(%struct.ident_t*, i32, i32, i32*, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dist_for_static_init_4u(%struct.ident_t*, i32, i32, i32*, i32*, i32*, i32*, i32*, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dist_for_static_init_8(%struct.ident_t*, i32, i32, i32*, i64*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dist_for_static_init_8u(%struct.ident_t*, i32, i32, i32*, i64*, i64*, i64*, i64*, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_single(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_end_single(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_omp_task_alloc(%struct.ident_t*, i32, i32, i64, i64, i32 (i32, i8*)*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_omp_task(%struct.ident_t*, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_end_taskgroup(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_taskgroup(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dist_dispatch_init_4(%struct.ident_t*, i32, i32, i32*, i32, i32, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dist_dispatch_init_4u(%struct.ident_t*, i32, i32, i32*, i32, i32, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dist_dispatch_init_8(%struct.ident_t*, i32, i32, i32*, i64, i64, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dist_dispatch_init_8u(%struct.ident_t*, i32, i32, i32*, i64, i64, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dispatch_init_4(%struct.ident_t*, i32, i32, i32, i32, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dispatch_init_4u(%struct.ident_t*, i32, i32, i32, i32, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dispatch_init_8(%struct.ident_t*, i32, i32, i64, i64, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dispatch_init_8u(%struct.ident_t*, i32, i32, i64, i64, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_dispatch_next_4(%struct.ident_t*, i32, i32*, i32*, i32*, i32*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_dispatch_next_4u(%struct.ident_t*, i32, i32*, i32*, i32*, i32*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_dispatch_next_8(%struct.ident_t*, i32, i32*, i64*, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_dispatch_next_8u(%struct.ident_t*, i32, i32*, i64*, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dispatch_fini_4(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dispatch_fini_4u(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dispatch_fini_8(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_dispatch_fini_8u(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_omp_task_begin_if0(%struct.ident_t*, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_omp_task_complete_if0(%struct.ident_t*, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_omp_task_with_deps(%struct.ident_t*, i32, i8*, i32, i8*, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_omp_wait_deps(%struct.ident_t*, i32, i32, i8*, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__kmpc_cancellationpoint(%struct.ident_t*, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_push_num_teams(%struct.ident_t*, i32, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_fork_teams(%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_taskloop(%struct.ident_t*, i32, i8*, i32, i64*, i64*, i64, i32, i32, i64, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_omp_target_task_alloc(%struct.ident_t*, i32, i32, i64, i64, i32 (i32, i8*)*, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_taskred_modifier_init(%struct.ident_t*, i32, i32, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_taskred_init(i32, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_task_reduction_modifier_fini(%struct.ident_t*, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_copyprivate(%struct.ident_t*, i32, i64, i8*, void (i8*, i8*)*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_threadprivate_cached(%struct.ident_t*, i32, i8*, i64, i8***)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_threadprivate_register(%struct.ident_t*, i8*, i8* (i8*)*, i8* (i8*, i8*)*, void (i8*)*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_doacross_init(%struct.ident_t*, i32, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_doacross_wait(%struct.ident_t*, i32, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_doacross_post(%struct.ident_t*, i32, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_doacross_fini(%struct.ident_t*, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_alloc(i32, i64, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_free(i32, i8*, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_init_allocator(i32, i8*, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_destroy_allocator(i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_push_target_tripcount(i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__tgt_target(i64, i8*, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__tgt_target_nowait(i64, i8*, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i32 @__tgt_target_teams(i64, i8*, i32, i8**, i8**, i64*, i64*, i32, i32)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__tgt_register_requires(i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__tgt_target_data_begin(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__tgt_target_data_begin_nowait(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__tgt_target_data_end(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__tgt_target_data_end_nowait(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__tgt_target_data_update(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__tgt_target_data_update_nowait(i64, i32, i8**, i8**, i64*, i64*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i64 @__tgt_mapper_num_components(i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__tgt_push_mapper_component(i8*, i8*, i8*, i64, i64)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_task_allow_completion_event(%struct.ident_t*, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_task_reduction_get_th_data(i32, i8*, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_task_reduction_init(i32, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare i8* @__kmpc_task_reduction_modifier_init(i8*, i32, i32, i32, i8*)
|
||||
|
||||
; CHECK: Function Attrs: nounwind
|
||||
; CHECK-NEXT: declare void @__kmpc_proxy_task_completed_ooo(i8*)
|
||||
|
||||
; OPTIMISTIC: ; Function Attrs: inaccessiblememonly nofree nosync nounwind writeonly
|
||||
; OPTIMISTIC-NEXT: declare dso_local void @omp_set_num_threads(i32)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user