[Mlir-commits] [mlir] [mlir][irdl] Add IsolatedFromAbove trait to irdl.operation op (PR #181108)

lonely eagle llvmlistbot at llvm.org
Thu Feb 12 09:32:40 PST 2026


https://github.com/linuxlonelyeagle updated https://github.com/llvm/llvm-project/pull/181108

>From 15eff0bb48d183da9eb12ad66670ca2974111927 Mon Sep 17 00:00:00 2001
From: linuxlonelyeagle <2020382038 at qq.com>
Date: Thu, 12 Feb 2026 09:06:29 +0000
Subject: [PATCH 1/2] add IsolatedFromAbove trait to irdl.operation.

---
 mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td b/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
index 3b6b09973645c..de5d0d18e52bc 100644
--- a/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
+++ b/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
@@ -169,7 +169,7 @@ def IRDL_ParametersOp : IRDL_Op<"parameters",
 def IRDL_OperationOp : IRDL_Op<"operation",
     [HasParent<"DialectOp">, NoTerminator, NoRegionArguments,
     AtMostOneChildOf<"OperandsOp, ResultsOp, AttributesOp, RegionsOp">,
-    Symbol]> {
+    Symbol, IsolatedFromAbove]> {
   let summary = "Define a new operation";
   let description = [{
     `irdl.operation` defines a new operation belonging to the `irdl.dialect`

>From c8ffc39363758e0a7a91280f663c1bc9d6150bf1 Mon Sep 17 00:00:00 2001
From: linuxlonelyeagle <2020382038 at qq.com>
Date: Thu, 12 Feb 2026 17:32:19 +0000
Subject: [PATCH 2/2] add IsolatedFromAbove trait to irdl.attribute and
 irdl.type.

---
 mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td b/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
index de5d0d18e52bc..688ec9855fa38 100644
--- a/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
+++ b/mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
@@ -62,7 +62,7 @@ def IRDL_DialectOp : IRDL_Op<"dialect",
 
 def IRDL_TypeOp : IRDL_Op<"type",
     [HasParent<"DialectOp">, NoTerminator, NoRegionArguments,
-     AtMostOneChildOf<"ParametersOp">, Symbol]> {
+     AtMostOneChildOf<"ParametersOp">, Symbol, IsolatedFromAbove]> {
   let summary = "Define a new type";
   let description = [{
     `irdl.type` defines a new type belonging to the `irdl.dialect` parent.
@@ -96,7 +96,7 @@ def IRDL_TypeOp : IRDL_Op<"type",
 
 def IRDL_AttributeOp : IRDL_Op<"attribute",
     [HasParent<"DialectOp">, NoTerminator, NoRegionArguments,
-     AtMostOneChildOf<"ParametersOp">, Symbol]> {
+     AtMostOneChildOf<"ParametersOp">, Symbol, IsolatedFromAbove]> {
   let summary = "Define a new attribute";
   let description = [{
     `irdl.attribute` defines a new attribute belonging to the `irdl.dialect`



More information about the Mlir-commits mailing list