[Mlir-commits] [mlir] [mlir][SCF] Allow using a custom operation to generate loops with `mlir::tileUsingSCF`. (PR #159660)

Quinn Dawkins llvmlistbot at llvm.org
Fri Sep 19 13:31:02 PDT 2025


================
@@ -33,6 +33,14 @@ using SCFTileSizeComputationFunction =
 
 /// Options to use to control tiling.
 struct SCFTilingOptions {
+  /// Specify which loop construct to use for tile and fuse.
+  enum class LoopType { ForOp, ForallOp, CustomOp };
+  LoopType loopType = LoopType::ForOp;
----------------
qedawkins wrote:

Would it perhaps make sense to move `scf.for` and `scf.forall` to go through the same path as `CustomOp` and just offer wrappers that set the options for those loop types? Then we could potentially move this code out of SCF into a more generic location.

It would also simplify the `scf.forall` only options that currently exist.

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


More information about the Mlir-commits mailing list