================
@@ -1452,15 +1452,53 @@ class OpenMP_ThreadLimitClauseSkip<
> : OpenMP_Clause<traits, arguments, assemblyFormat, description,
extraClassDeclaration> {
let arguments = (ins
- Optional<AnyInteger>:$thread_limit
+ ConfinedAttr<OptionalAttr<I64Attr>, [IntPositive]>:$thread_limit_num_dims,
+ Variadic<IntLikeType>:$thread_limit_dims_values
);
let optAssemblyFormat = [{
- `thread_limit` `(` $thread_limit `:` type($thread_limit) `)`
+ `thread_limit` `(` custom<ThreadLimitClause>(
+ $thread_limit_num_dims, $thread_limit_dims_values,
type($thread_limit_dims_values)
+ ) `)`
}];
let description = [{
- The optional `thread_limit` specifies the limit on the number of threads.
+ The `thread_limit` clause specifies the limit on the number of threads.
+
+ With dims modifier:
+ - The number of dimensions is specified by the `thread_limit_num_dims`.
+ - The values for each dimension are specified by the
`thread_limit_dims_values`.
+ - Format: `thread_limit(dims(N): values : type)`
+ - Example: `thread_limit(dims(2): %n, %m : i64)`
----------------
skc7 wrote:
I tried the mlir syntax for these clauses to be close to openMP dims modifier
syntax. I'm evaluating the changes required to remove the dims(N) syntax and
just have list of values. Will post the patch.
https://github.com/llvm/llvm-project/pull/171825
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits