[Mlir-commits] [llvm] [mlir] [MLIR][OpenMP] add interchange operation in the OpenMP mlir dialect (PR #186381)

Michael Kruse llvmlistbot at llvm.org
Thu Mar 19 07:08:55 PDT 2026


================
@@ -1148,6 +1149,31 @@ class OpenMP_LooprangeClauseSkip<
 
 def OpenMP_LooprangeClause : OpenMP_LooprangeClauseSkip<>;
 
+//===----------------------------------------------------------------------===//
+//  V6.0: `permutation` clause
+//===----------------------------------------------------------------------===//
+
+class OpenMP_PermutationClauseSkip<
+    bit traits = false, bit arguments = false, bit assemblyFormat = false,
+    bit description = false, bit extraClassDeclaration = false>
+    : OpenMP_Clause<traits, arguments, assemblyFormat, description,
+                    extraClassDeclaration> {
+
+  let arguments = (ins OptionalAttr<ArrayAttr>:$permutation);
+
+  let optAssemblyFormat = [{
+    `permutation` `(` $permutation `)`
+  }];
+
+  let description = [{
+    The `permutation` clause contains the new order in which the loops affected
+    by a loop interchange are arranged. The clause contains a list of positive
+    numbers known beforehand.
----------------
Meinersbur wrote:

```suggestion
    by a loop interchange are arranged. The clause contains a permuted list of 1-based loop indices, where 1 is the outermost loop.
```
[suggestion] I am confused what "know beforehand" is stating? That it is constant?

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


More information about the Mlir-commits mailing list