[Mlir-commits] [mlir] [MLIR] Implement mayHaveNonZeroOffset class (PR #231285)

William Moses llvmlistbot at llvm.org
Mon Oct 12 13:54:19 PDT 2026


================
@@ -36,6 +36,19 @@ def ViewLikeOpInterface : OpInterface<"ViewLikeOpInterface"> {
       /*defaultImplementation=*/[{
         return $_op->getResult(0);
       }]
+    >,
+    InterfaceMethod<
+      /*desc=*/[{
+        Returns true if the view may start at a different address than its
+        source.
+      }],
+      /*retTy=*/"bool",
+      /*methodName=*/"mayHaveNonZeroOffset",
+      /*args=*/(ins),
+      /*methodBody=*/"",
+      /*defaultImplementation=*/[{
+        return false;
----------------
wsmoses wrote:

I'm not sure putting a default impl here is wise [since false is not the conservative case]

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


More information about the Mlir-commits mailing list