[Mlir-commits] [mlir] [mlir][PDL] Relax PDL verification constraints (PR #172039)

Mehdi Amini llvmlistbot at llvm.org
Fri Dec 12 08:26:25 PST 2025


================
@@ -141,6 +141,14 @@ class ParentOneOf<list<string> ops>
     : ParamNativeOpTrait<"HasParent", !interleave(ops, ", ")>,
       StructuralOpTrait;
 
+// Op's parent operation is not the provided one.
+class HasParentNotOf<string op>
+    : ParamNativeOpTrait<"HasParentNotOf", op>, StructuralOpTrait;
+
+class ParentNotOneOf<list<string> ops>
+    : ParamNativeOpTrait<"HasParentNotOf", !interleave(ops, ", ")>,
+      StructuralOpTrait;
----------------
joker-eph wrote:

These traits are pretty weird to me, I don't quite make sense of why you need these actually. Blacklisting some parents seems a bit abirtrary in a world where there could be some many potential operations.


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


More information about the Mlir-commits mailing list