[llvm-branch-commits] [mlir] [OpenMP][MLIR] Add num_threads clause with dims modifier support (PR #171767)

Krzysztof Parzyszek via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Dec 18 06:23:41 PST 2025


================
@@ -1069,16 +1069,55 @@ class OpenMP_NumThreadsClauseSkip<
   > : OpenMP_Clause<traits, arguments, assemblyFormat, description,
                     extraClassDeclaration> {
   let arguments = (ins
+    ConfinedAttr<OptionalAttr<I64Attr>, [IntPositive]>:$num_threads_num_dims,
+    Variadic<AnyInteger>:$num_threads_dims_values,
     Optional<IntLikeType>:$num_threads
----------------
kparzysz wrote:

I think we should have one list for the arguments in addition to the num_dims attribute.

I'm not sure if I understand the rest...  The N in dims(N) must be a literal integer (so we can verify that it's positive), but the actual arguments can be expressions.  We can use any suitable type for those.  Whether it's AnyInteger or IntLikeType probably doesn't matter that much.

https://github.com/llvm/llvm-project/pull/171767


More information about the llvm-branch-commits mailing list