[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 14:50:38 PDT 2020
jdoerfert added inline comments.
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:340
+__OMP_RTL(__kmpc_omp_reg_task_with_affinity, false, Int32, IdentPtr, Int32,
+ VoidPtr, Int32, VoidPtr)
----------------
I think this was commited as part of 89d9dba2c6885949887edf4b80e1aabf8d8f3f88 (with a different but compatible type).
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:594
+ EnumAttr(WillReturn))
: AttributeSet(EnumAttr(NoUnwind)))
----------------
I guess if we have `InaccessibleMemOnly` we should call the set `InaccessibleOnlyAttrs`. Though we need to also have one with `InaccessibleMemOrArgMemOnly` for functions have the `ident_t *` argument, e.g., most `__kmpc` functions that are now ArgOnlyAttrs. I think we can also add nofree to almost all of them.
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:611
__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(), AttributeSet(), {})
-__OMP_RTL_ATTRS(__kmpc_omp_taskyield,
- AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
- AttributeSet(), {})
-__OMP_RTL_ATTRS(__kmpc_push_num_threads,
- AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
- AttributeSet(), {})
-__OMP_RTL_ATTRS(__kmpc_push_proc_bind,
- AttributeSet(EnumAttr(InaccessibleMemOrArgMemOnly)),
+__OMP_RTL_ATTRS(__kmpc_fork_call, DefaultAttrs, AttributeSet(), {})
+__OMP_RTL_ATTRS(__kmpc_omp_taskwait, ArgOnlyAttrs, AttributeSet(), {})
----------------
A fork doesn't need to return, depending on the user function, and it can sync.
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:612
+__OMP_RTL_ATTRS(__kmpc_fork_call, DefaultAttrs, AttributeSet(), {})
+__OMP_RTL_ATTRS(__kmpc_omp_taskwait, ArgOnlyAttrs, AttributeSet(), {})
+__OMP_RTL_ATTRS(__kmpc_omp_taskyield, ArgOnlyAttrs, AttributeSet(), {})
----------------
taskwait is a barrier-like thing
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:674
+__OMP_RTL_ATTRS(__kmpc_ordered, ArgOnlyAttrs, AttributeSet(), {})
+__OMP_RTL_ATTRS(__kmpc_end_ordered, ArgOnlyAttrs, AttributeSet(), {})
----------------
These are barrier-like as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81031/new/
https://reviews.llvm.org/D81031
More information about the llvm-commits
mailing list