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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Oct 25 15:27:32 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;
----------------
aokblast wrote:

I think it is fine to treat this as default true as it pass the decide to the underlying checker. So I add some cases here I can confirm will have no offsetNon0 as a speedup.

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


More information about the Mlir-commits mailing list