1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[OpenMP][FIX] Do not use InaccessibleMemOrArgMemOnly for barrier and flush

This was reported as PR45635, committed first as
72a9e7c926f4e32f209e528ec407fe526da5587e, reverted by
188f5cde9635a29a3f20ee2a73abd02890a752c7, and now recommitted with the
test change.
This commit is contained in:
Johannes Doerfert 2020-04-22 10:17:32 -05:00
parent 7f0438624e
commit 431b9991f6
2 changed files with 12 additions and 20 deletions

View File

@ -389,24 +389,16 @@ __OMP_ATTRS_SET(SetterAttrs,
#define __OMP_RTL_ATTRS(Name, FnAttrSet, RetAttrSet, ArgAttrSets) \
OMP_RTL_ATTRS(OMPRTL_##Name, FnAttrSet, RetAttrSet, ArgAttrSets)
__OMP_RTL_ATTRS(__kmpc_barrier,
AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_barrier, AttributeSet(), AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_cancel,
AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_cancel_barrier,
AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_flush,
AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_cancel_barrier, AttributeSet(), AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_flush, AttributeSet(), AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_global_thread_num, GetterAttrs, AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_fork_call, AttributeSet(EnumAttr(NoUnwind)),
AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_omp_taskwait,
AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_omp_taskwait, AttributeSet(), AttributeSet(), {})
__OMP_RTL_ATTRS(__kmpc_omp_taskyield,
AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
AttributeSet(), {})

View File

@ -720,17 +720,17 @@ declare void @__kmpc_end_critical(%struct.ident_t*, i32, [8 x i32]*)
; CHECK: ; Function Attrs: nounwind
; CHECK-NEXT: declare dso_local i32 @omp_get_supported_active_levels() #0
; CHECK: Function Attrs: inaccessiblemem_or_argmemonly
; CHECK-NEXT: declare void @__kmpc_barrier(%struct.ident_t*, i32)
; CHECK-NOT: Function Attrs
; CHECK: declare void @__kmpc_barrier(%struct.ident_t*, i32)
; CHECK: Function Attrs: inaccessiblemem_or_argmemonly
; CHECK-NEXT: declare i32 @__kmpc_cancel(%struct.ident_t*, i32, i32)
; CHECK: Function Attrs: inaccessiblemem_or_argmemonly
; CHECK-NEXT: declare i32 @__kmpc_cancel_barrier(%struct.ident_t*, i32)
; CHECK-NOT: Function Attrs
; CHECK: declare i32 @__kmpc_cancel_barrier(%struct.ident_t*, i32)
; CHECK: Function Attrs: inaccessiblemem_or_argmemonly
; CHECK-NEXT: declare void @__kmpc_flush(%struct.ident_t*)
; CHECK-NOT: Function Attrs
; CHECK: declare void @__kmpc_flush(%struct.ident_t*)
; CHECK: Function Attrs: nounwind
; CHECK-NEXT: declare i32 @__kmpc_global_thread_num(%struct.ident_t*)
@ -738,8 +738,8 @@ declare void @__kmpc_end_critical(%struct.ident_t*, i32, [8 x i32]*)
; CHECK: Function Attrs: nounwind
; CHECK-NEXT: declare void @__kmpc_fork_call(%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...)
; CHECK: Function Attrs: inaccessiblemem_or_argmemonly
; CHECK-NEXT: declare i32 @__kmpc_omp_taskwait(%struct.ident_t*, i32)
; CHECK-NOT: Function Attrs
; CHECK: declare i32 @__kmpc_omp_taskwait(%struct.ident_t*, i32)
; CHECK: Function Attrs: inaccessiblemem_or_argmemonly
; CHECK-NEXT: declare i32 @__kmpc_omp_taskyield(%struct.ident_t*, i32, i32)