[flang-commits] [flang] [mlir] [mlir][TilingInterface] Use `LoopLikeOpInterface` in tiling using SCF to unify tiling with `scf.for` and `scf.forall`. (PR #77874)
Matthias Springer via flang-commits
flang-commits at lists.llvm.org
Thu Jan 18 00:10:56 PST 2024
================
@@ -63,8 +63,9 @@ LogicalResult detail::verifyLoopLikeOpInterface(Operation *op) {
return op->emitOpError("different number of inits and region iter_args: ")
<< loopLikeOp.getInits().size()
<< " != " << loopLikeOp.getRegionIterArgs().size();
- if (loopLikeOp.getRegionIterArgs().size() !=
- loopLikeOp.getYieldedValues().size())
+ if (!loopLikeOp.getYieldedValues().empty() &&
----------------
matthias-springer wrote:
Actually, there is a better way to check without `std::nullopt`:
```
if (!loopLikeOp.getYieldedValuesMutable().getOwner() && ...)
```
https://github.com/llvm/llvm-project/pull/77874
More information about the flang-commits
mailing list