[Mlir-commits] [mlir] [mlir][TilingInterface] Use `LoopLikeOpInterface` in tiling using SCF to unify tiling with `scf.for` and `scf.forall`. (PR #77874)
Matthias Springer
llvmlistbot at llvm.org
Wed Jan 17 01:02:46 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:
Among other things, this check used to guard against the case where a user forgot to implement `getYieldedValuesMutable`. That interface method has a default implementation of `return {}`, and with the new verifier such mistakes can easily stay unnoticed. If the concept of "yielded values" does not apply to a loop-like op, we should `return std::nullopt;`.
https://github.com/llvm/llvm-project/pull/77874
More information about the Mlir-commits
mailing list