[Mlir-commits] [mlir] [MLIR][Python] Add effect and speculatability specifiers for Python-defined ops (PR #216773)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Aug 22 07:58:47 PDT 2026
================
@@ -1035,6 +1035,67 @@ class PureOp(TestIface.Operation, name="pure"):
print("static spec query error:", e)
+# CHECK: TEST: testExtDialectWithPublicInterfaces
+ at run
+def testExtDialectWithPublicInterfaces():
+ class TestPublicIface(Dialect, name="ext_public_iface"):
+ pass
+
+ class NoEffectOp(
+ TestPublicIface.Operation, name="no_effect", traits=[NoMemoryEffect]
+ ):
+ pass
+
+ class AlwaysSpeculatableOp(
+ TestPublicIface.Operation,
+ name="always_speculatable",
+ traits=[AlwaysSpeculatable],
+ ):
+ pass
+
+ class RecursivelySpeculatableOp(
+ TestPublicIface.Operation,
+ name="recursively_speculatable",
+ traits=[NoTerminatorTrait, RecursivelySpeculatable],
----------------
PragmaTwice wrote:
I think all traits have `Trait` suffix? `RecursivelySpeculatable` is not a trait. It is a subclass of an interface i.e. a fallback model.
https://github.com/llvm/llvm-project/pull/216773
More information about the Mlir-commits
mailing list