[Mlir-commits] [mlir] [MLIR][Python] Add effect and speculatability specifiers for Python-defined ops (PR #216773)
Rolf Morel
llvmlistbot at llvm.org
Sat Aug 22 07:32:20 PDT 2026
================
@@ -169,6 +187,17 @@ def run_pass(source, pipeline):
with ir.Context(), ir.Location.unknown():
MemoryEffectsTest.load()
+ from mlir.dialects import scf, arith
+
+ # CHECK: recursive memory effects traits: False True True False
+ print(
+ "recursive memory effects traits:",
+ RegionOp.has_trait(ir.RecursiveMemoryEffectsTrait),
----------------
rolfmorel wrote:
Out of interest: would `Op.has_trait(ir.Pure)` work on an op with `HasNoMemoryEffect` and `AlwaysSpecutable`?
https://github.com/llvm/llvm-project/pull/216773
More information about the Mlir-commits
mailing list