[Mlir-commits] [mlir] [mlir][TilingInterface] Use `LoopLikeOpInterface` in tiling using SCF to unify tiling with `scf.for` and `scf.forall`. (PR #77874)
Mehdi Amini
llvmlistbot at llvm.org
Wed Jan 17 23:19:05 PST 2024
================
@@ -584,6 +588,63 @@ ForOp::replaceWithAdditionalYields(RewriterBase &rewriter,
return cast<LoopLikeOpInterface>(newLoop.getOperation());
}
+FailureOr<LoopLikeOpInterface> ForOp::yieldTiledValuesAndReplace(
+ RewriterBase &rewriter, ValueRange newInitOperands,
+ const YieldTiledValuesFn &yieldTiledValuesFn) {
+ OpBuilder::InsertionGuard g(rewriter);
+ rewriter.setInsertionPoint(getOperation());
+
+ auto inits = llvm::to_vector(getInitArgs());
+ inits.append(newInitOperands.begin(), newInitOperands.end());
+ scf::ForOp newLoop = rewriter.create<scf::ForOp>(
----------------
joker-eph wrote:
No need for scf:: here: we're inside the ForOp itself!
https://github.com/llvm/llvm-project/pull/77874
More information about the Mlir-commits
mailing list