[Mlir-commits] [mlir] [MLIR][OpenMP] Add a new ComposableLoopWrapperInterface to check/set a composite unitAttr. (PR #101991)
Sergio Afonso
llvmlistbot at llvm.org
Tue Aug 6 02:42:23 PDT 2024
================
@@ -142,6 +142,40 @@ def LoopWrapperInterface : OpInterface<"LoopWrapperInterface"> {
];
}
+def ComposableLoopWrapperInterface : OpInterface<"ComposableLoopWrapperInterface"> {
+ let description = [{
+ OpenMP operations that can wrap a single loop nest. When taking a wrapper
+ role, these operations must only contain a single region with a single block
+ in which there's a single operation and a terminator. That nested operation
+ must be another loop wrapper or an `omp.loop_nest`.
+ }];
+
+ let cppNamespace = "::mlir::omp";
+
+ let methods = [
+ InterfaceMethod<
+ /*description=*/[{
+ Check whether the operation is composable.
----------------
skatrak wrote:
Feel free to reword it as you see fit, the important thing is that the presence of the attribute represents that the operation is representing one leaf of a composite construct.
```suggestion
Check whether the operation is representing a leaf of a composite OpenMP construct.
```
https://github.com/llvm/llvm-project/pull/101991
More information about the Mlir-commits
mailing list