[llvm-branch-commits] [flang] [mlir] [OpenMP][MLIR] Set omp.composite attr for composite loop wrappers and add verifier checks (PR #102341)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 12 04:44:35 PDT 2024


================
@@ -1748,11 +1754,27 @@ LogicalResult WsloopOp::verify() {
   if (!isWrapper())
     return emitOpError() << "must be a loop wrapper";
 
+  auto wrapper =
+      llvm::dyn_cast_if_present<LoopWrapperInterface>((*this)->getParentOp());
+  bool isCompositeWrapper = wrapper && wrapper.isWrapper() &&
+                            (!llvm::isa<ParallelOp>(wrapper) ||
+                             llvm::isa<DistributeOp>(wrapper->getParentOp()));
----------------
skatrak wrote:

Same comment for `SimdOp::verify()`.
```suggestion
                             llvm::isa_and_present<DistributeOp>(wrapper->getParentOp()));
```

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


More information about the llvm-branch-commits mailing list