[Mlir-commits] [mlir] [mlir][affine] Make [de]linearize_index a valid source of dims (PR #138929)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat May 10 15:20:57 PDT 2025


================
@@ -1153,6 +1153,10 @@ def AffineDelinearizeIndexOp : Affine_Op<"delinearize_index", [Pure]> {
     /// there is no outer bound specified, the leading entry of this result will be
     /// nullptr.
     SmallVector<OpFoldResult> getPaddedBasis();
+
+    /// Returns true if the result of this operation can be used as dimension id
+    /// within 'region', i.e., for all its uses with `region`.
+    bool isValidDim(Region *region);
----------------
MaheshRavishankar wrote:

This seems like it doesn't belong in this operation. It is some restriction out by ops where this shows up. So the validity should be determined there and not here. Another option is interfaces and external implementation of interfaces

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


More information about the Mlir-commits mailing list