[Mlir-commits] [mlir] [mlir][DLTI] Stop using Operation::getAttrs (NFC) (PR #222776)

Mehdi Amini llvmlistbot at llvm.org
Thu Sep 10 14:09:03 PDT 2026


https://github.com/joker-eph created https://github.com/llvm/llvm-project/pull/222776

Inspect only discardable attributes when looking for DLTI query metadata.

This is part of a general migration to use the "new" properties-based APIs and stop mixing discardable/inherent attributes, see #155475

Assisted-by: Codex

>From 866c966db6237a638e5b37cd39929e78416a08d6 Mon Sep 17 00:00:00 2001
From: Mehdi Amini <joker.eph at gmail.com>
Date: Thu, 10 Sep 2026 10:52:34 -0700
Subject: [PATCH] [mlir][DLTI] Stop using Operation::getAttrs

Inspect only discardable attributes when looking for DLTI query metadata.

This is part of a general migration to use the "new" properties-based APIs
and stop mixing discardable/inherent attributes, see #155475

Assisted-by: Codex
---
 mlir/lib/Dialect/DLTI/DLTI.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/lib/Dialect/DLTI/DLTI.cpp b/mlir/lib/Dialect/DLTI/DLTI.cpp
index da572f123fdc1..d6adf8f21aded 100644
--- a/mlir/lib/Dialect/DLTI/DLTI.cpp
+++ b/mlir/lib/Dialect/DLTI/DLTI.cpp
@@ -525,7 +525,7 @@ getClosestQueryable(Operation *op) {
 
   // Search op and its ancestors for the first attached DLTIQueryInterface attr.
   do {
-    for (NamedAttribute attr : op->getAttrs())
+    for (NamedAttribute attr : op->getDiscardableAttrDictionary().getValue())
       if ((queryable = dyn_cast<DLTIQueryInterface>(attr.getValue())))
         break;
   } while (!queryable && (op = op->getParentOp()));



More information about the Mlir-commits mailing list