[llvm-branch-commits] [flang] [mlir] [OpenMP][MLIR] Add thread_limit with dims modifier support (PR #171825)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 16 05:27:21 PST 2025


================
@@ -1452,15 +1452,53 @@ class OpenMP_ThreadLimitClauseSkip<
   > : OpenMP_Clause<traits, arguments, assemblyFormat, description,
                     extraClassDeclaration> {
   let arguments = (ins
+    ConfinedAttr<OptionalAttr<I64Attr>, [IntPositive]>:$thread_limit_num_dims,
+    Variadic<AnyInteger>:$thread_limit_dims_values,
     Optional<AnyInteger>:$thread_limit
----------------
skc7 wrote:

Initial idea was to have both of them merged to be single list like implementation in your PR #[171454 ](https://github.com/llvm/llvm-project/pull/171454) but this lead to issues with flang lowering to mlir and then mlir lowering to llvmir, as previously, getThreadLimit() API returned a Value now it returns a list. Also, having separate arguments for new and old spec though not optimal, seemed clean approach since the verifier only allows either dims modifier related args or old style thread_limit. 

Will re-check the changes required and post the patch.

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


More information about the llvm-branch-commits mailing list