[Mlir-commits] [mlir] Revert "[mlir][DLTI] Introduce an operation interface for scoped DLTI queries (#222776)" (PR #232698)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Oct 16 04:52:06 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-gpu

Author: Andrzej WarzyƄski (banach-space)

<details>
<summary>Changes</summary>

This reverts commit efd7e66eb884dba5341ab250e1bd245bab64e92c.

Broken bots:
* https://lab.llvm.org/buildbot/#/builders/240/builds/1016
* https://lab.llvm.org/buildbot/#/builders/241/builds/1040


---

Patch is 75.20 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/232698.diff


38 Files Affected:

- (modified) mlir/docs/DataLayout.md (-11) 
- (modified) mlir/include/mlir/Dialect/DLTI/CMakeLists.txt (-5) 
- (modified) mlir/include/mlir/Dialect/DLTI/DLTI.h (+5-11) 
- (modified) mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td (+9-9) 
- (removed) mlir/include/mlir/Dialect/DLTI/DLTIOpInterfaces.td (-58) 
- (modified) mlir/include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td (+10-10) 
- (modified) mlir/include/mlir/Dialect/Func/IR/FuncOps.h (-1) 
- (modified) mlir/include/mlir/Dialect/Func/IR/FuncOps.td (+3-9) 
- (modified) mlir/include/mlir/Dialect/GPU/IR/GPUDialect.h (-1) 
- (modified) mlir/include/mlir/Dialect/GPU/IR/GPUOps.td (+3-12) 
- (modified) mlir/include/mlir/IR/BuiltinDialect.h (+1-1) 
- (modified) mlir/include/mlir/IR/BuiltinOps.td (+1-8) 
- (modified) mlir/include/mlir/Interfaces/DataLayoutInterfaces.td (-6) 
- (modified) mlir/include/mlir/Target/LLVMIR/Transforms/Passes.td (+4-5) 
- (modified) mlir/lib/Dialect/DLTI/CMakeLists.txt (-1) 
- (modified) mlir/lib/Dialect/DLTI/DLTI.cpp (+24-83) 
- (modified) mlir/lib/Dialect/Func/IR/CMakeLists.txt (-1) 
- (modified) mlir/lib/Dialect/Func/IR/FuncOps.cpp (-53) 
- (modified) mlir/lib/Dialect/GPU/IR/GPUDialect.cpp (-49) 
- (modified) mlir/lib/IR/BuiltinDialect.cpp (-31) 
- (modified) mlir/lib/Target/LLVMIR/Transforms/TargetToTargetFeatures.cpp (+6-7) 
- (removed) mlir/test/Bytecode/dlti-query-op-interface-compat.mlir (-27) 
- (removed) mlir/test/Bytecode/dlti-query-op-interface-pre-dlti-gpu.mlirbc () 
- (removed) mlir/test/Bytecode/dlti-query-op-interface-pre-dlti.mlirbc () 
- (removed) mlir/test/Bytecode/dlti-query-op-interface-roundtrip.mlir (-12) 
- (modified) mlir/test/Conversion/MPIToLLVM/mpitollvm.mlir (+8-8) 
- (modified) mlir/test/Conversion/ShardToMPI/convert-shard-to-mpi.mlir (+4-4) 
- (modified) mlir/test/Conversion/ShardToMPI/convert-shardshape-to-mpi.mlir (+1-1) 
- (modified) mlir/test/Dialect/Builtin/Bytecode/builtin_fixed_0.mlirbc () 
- (modified) mlir/test/Dialect/DLTI/invalid.mlir (-5) 
- (removed) mlir/test/Dialect/DLTI/query-op-interface.mlir (-32) 
- (modified) mlir/test/Dialect/DLTI/query.mlir (+34-91) 
- (modified) mlir/test/Dialect/MPI/canonicalize.mlir (+1-1) 
- (modified) mlir/test/Dialect/Shard/forward-sharding-propagation.mlir (+1-1) 
- (modified) mlir/test/Target/LLVMIR/target-to-data-layout-and-target-features.mlir (+22-33) 
- (modified) mlir/test/lib/Dialect/DLTI/TestDataLayoutQuery.cpp (+1-69) 
- (modified) mlir/test/lib/Dialect/Test/TestOps.td (+1-5) 
- (modified) mlir/unittests/Bytecode/BytecodeTest.cpp (-4) 


``````````diff
diff --git a/mlir/docs/DataLayout.md b/mlir/docs/DataLayout.md
index 984784fb7b894c..a6ee6120e8b921 100644
--- a/mlir/docs/DataLayout.md
+++ b/mlir/docs/DataLayout.md
@@ -295,14 +295,3 @@ The [DLTI](../Dialects/DLTIDialect/) dialect provides the attributes implementin
 attribute that can be used to attach the specification to a given operation. The
 verifier of this attribute triggers those of the specification and checks the
 compatibility of nested specifications.
-
-DLTI key-value queries use a separate interface from data layout scope
-calculation. `DLTIQueryOpInterface` does not require a single backing
-attribute: an operation can answer the key `"architecture"` using an inherent
-`architecture = "sm_90"` attribute, without storing a `dlti` attribute or a
-`#dlti.map`. Its default implementation answers keys from an operation's
-inherent `dlti` attribute.
-`func.func` and `gpu.module` implement this interface; `builtin.module`
-acquires it when the DLTI dialect is loaded. A query searches the target
-operation and then its ancestors until one answers the first key. Further keys
-are queried on the returned attribute through `DLTIQueryInterface`.
diff --git a/mlir/include/mlir/Dialect/DLTI/CMakeLists.txt b/mlir/include/mlir/Dialect/DLTI/CMakeLists.txt
index d42f4663b39902..a7695e67e2d8a5 100644
--- a/mlir/include/mlir/Dialect/DLTI/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/DLTI/CMakeLists.txt
@@ -7,8 +7,3 @@ set(LLVM_TARGET_DEFINITIONS DLTIAttrs.td)
 mlir_tablegen(DLTIAttrs.h.inc -gen-attrdef-decls -attrdefs-dialect=dlti)
 mlir_tablegen(DLTIAttrs.cpp.inc -gen-attrdef-defs -attrdefs-dialect=dlti)
 add_mlir_dialect_tablegen_target(MLIRDLTIAttrsIncGen)
-
-set(LLVM_TARGET_DEFINITIONS DLTIOpInterfaces.td)
-mlir_tablegen(DLTIOpInterfaces.h.inc -gen-op-interface-decls)
-mlir_tablegen(DLTIOpInterfaces.cpp.inc -gen-op-interface-defs)
-add_mlir_generic_tablegen_target(MLIRDLTIOpInterfacesIncGen)
diff --git a/mlir/include/mlir/Dialect/DLTI/DLTI.h b/mlir/include/mlir/Dialect/DLTI/DLTI.h
index 41e42cd940ce0c..84cf6eabc5fa93 100644
--- a/mlir/include/mlir/Dialect/DLTI/DLTI.h
+++ b/mlir/include/mlir/Dialect/DLTI/DLTI.h
@@ -24,25 +24,19 @@ class DataLayoutEntryAttrStorage;
 } // namespace mlir
 namespace mlir {
 namespace dlti {
-namespace detail {
-FailureOr<Attribute> queryDlti(Operation *op, DataLayoutEntryKey key);
-LogicalResult setDlti(Operation *op, DataLayoutEntryKey key, Attribute value);
-} // namespace detail
-
-/// Query the first key at `op` or the nearest ancestor that can answer it.
-/// Query later keys recursively on the returned attributes, without searching
-/// operation ancestors again.
+/// Perform a DLTI-query at `op`, recursively querying each key of `keys` on
+/// query interface-implementing attrs, starting from attr obtained from `op`.
 FailureOr<Attribute> query(Operation *op, ArrayRef<DataLayoutEntryKey> keys,
                            bool emitError = false);
 
-/// As above, using each string in `keys` as a DLTI entry key.
+/// Perform a DLTI-query at `op` using each string in `keys` as a separate DLTI
+/// entry key, recursively querying on query interface-implementing attrs,
+/// starting from attr obtained from `op`.
 FailureOr<Attribute> query(Operation *op, ArrayRef<StringRef> keys,
                            bool emitError = false);
 } // namespace dlti
 } // namespace mlir
 
-#include "mlir/Dialect/DLTI/DLTIOpInterfaces.h.inc"
-
 #define GET_ATTRDEF_CLASSES
 #include "mlir/Dialect/DLTI/DLTIAttrs.h.inc"
 #include "mlir/Dialect/DLTI/DLTIDialect.h.inc"
diff --git a/mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td b/mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td
index 8e16363adf8c33..56bd704d306560 100644
--- a/mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td
+++ b/mlir/include/mlir/Dialect/DLTI/DLTIAttrs.td
@@ -115,14 +115,14 @@ def DLTI_MapAttr : DLTIAttr<"Map", [DLTIQueryInterface]> {
     A Data Layout and Target Information map is a list of entries effectively
     encoding a dictionary, mapping DLTI-related keys to DLTI-related values.
 
-    This attribute facilitates queries for arbitrary DLTI key-value
-    associations. An operation can store it in its inherent `dlti` attribute
-    and expose its entries through `DLTIQueryOpInterface`. Query results that
-    implement `DLTIQueryInterface` can be queried recursively.
+    This attribute's main purpose is to facilate querying IR for arbitrary
+    key-value associations that encode DLTI. Facility functions exist to perform
+    recursive lookups on nested DLTI-map/query interface-implementing
+    attributes.
 
     Consider the following flat encoding of a single-key dictionary
     ```
-    #dlti.map<"CPU::cache::L1::size_in_bytes" = 65536 : i32>
+    #dlti.map<"CPU::cache::L1::size_in_bytes" = 65536 : i32>>
     ```
     versus nested maps, which make it possible to obtain sub-dictionaries of
     related information (with the following example making use of other
@@ -137,12 +137,12 @@ def DLTI_MapAttr : DLTIAttr<"Map", [DLTIQueryInterface]> {
     With the flat encoding, the implied structure of the key is ignored, that is
     the only successful query (as expressed in the Transform Dialect) is:
     `transform.dlti.query ["CPU::cache::L1::size_in_bytes"] at %op`,
-    where `%op` handles an operation with the flat `#dlti.map` stored as its
-    inherent `dlti` attribute.
+    where `%op` is a handle to an operation which associates the flat-encoding
+    `#dlti.map` attribute.
 
     For querying nested dictionaries, the relevant keys need to be separately
-    provided. If `%op` handles an operation with the nested
-    `#dlti.target_system_spec` above as its inherent `dlti` attribute, then
+    provided. That is, if `%op` is an handle to an op which has the nesting
+    `#dlti.target_system_spec`-attribute from above attached, then
     `transform.dlti.query ["CPU","cache","L1","size_in_bytes"] at %op` gives
     back the first leaf value contained. To access the other leaf, we need to do
     `transform.dlti.query ["CPU","cache","L1d","size_in_bytes"] at %op`.
diff --git a/mlir/include/mlir/Dialect/DLTI/DLTIOpInterfaces.td b/mlir/include/mlir/Dialect/DLTI/DLTIOpInterfaces.td
deleted file mode 100644
index 074aff85c80b5a..00000000000000
--- a/mlir/include/mlir/Dialect/DLTI/DLTIOpInterfaces.td
+++ /dev/null
@@ -1,58 +0,0 @@
-//===- DLTIOpInterfaces.td - DLTI operation interfaces -----*- tablegen -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef MLIR_DIALECT_DLTI_DLTIOPINTERFACES
-#define MLIR_DIALECT_DLTI_DLTIOPINTERFACES
-
-include "mlir/Interfaces/DataLayoutInterfaces.td"
-
-def DLTIQueryOpInterface : OpInterface<"DLTIQueryOpInterface"> {
-  let cppNamespace = "::mlir";
-
-  let description = [{
-    Operation interface for scoped DLTI key-value associations.
-
-    Queries and updates operate on one key at a time. The interface does not
-    prescribe how an operation stores values. For example, an operation with
-    an inherent `architecture = "sm_90"` attribute could return that string
-    attribute for the key `"architecture"`, without having a `dlti` attribute
-    or a `#dlti.map`.
-
-    The default implementations use the operation's inherent `dlti` attribute.
-    An update preserves other entries in a `#dlti.map`; setting a null value
-    removes an entry. Updating a non-map `dlti` attribute or using a null or
-    empty string key fails.
-  }];
-
-  let methods = [
-    InterfaceMethod<
-      /*description=*/"Returns the DLTI value associated with the key.",
-      /*retTy=*/"::mlir::FailureOr<::mlir::Attribute>",
-      /*methodName=*/"queryDlti",
-      /*args=*/(ins "::mlir::DataLayoutEntryKey":$key),
-      /*methodBody=*/"",
-      /*defaultImplementation=*/[{
-        return ::mlir::dlti::detail::queryDlti($_op.getOperation(), key);
-      }]
-    >,
-    InterfaceMethod<
-      /*description=*/"Creates, replaces, or removes a DLTI key-value "
-                      "association.",
-      /*retTy=*/"::mlir::LogicalResult",
-      /*methodName=*/"setDlti",
-      /*args=*/(ins "::mlir::DataLayoutEntryKey":$key,
-                    "::mlir::Attribute":$value),
-      /*methodBody=*/"",
-      /*defaultImplementation=*/[{
-        return ::mlir::dlti::detail::setDlti($_op.getOperation(), key, value);
-      }]
-    >
-  ];
-}
-
-#endif // MLIR_DIALECT_DLTI_DLTIOPINTERFACES
diff --git a/mlir/include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td b/mlir/include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td
index 748074a8e2c067..f25bb383912d45 100644
--- a/mlir/include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td
+++ b/mlir/include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td
@@ -19,25 +19,25 @@ def QueryOp : Op<Transform_Dialect, "dlti.query", [
   TransformOpInterface, TransformEachOpTrait,
   DeclareOpInterfaceMethods<MemoryEffectsOpInterface>
 ]> {
-  let summary = "Return attribute (as param) associated to key via DLTI";
+  let summary = "Return attribute (as param) associated to key via DTLI";
   let description = [{
     This op queries data layout and target information associated to payload
     IR by way of the DLTI dialect.
 
-    A lookup of the first key is performed at `target` or its ancestors by way
-    of `DLTIQueryOpInterface`. Ancestors that do not implement the interface or
-    cannot answer that key are skipped. Each key should be either a (quoted)
-    string or a type. If more than one key is provided, the lookup continues
-    recursively on the returned attributes by way of `DLTIQueryInterface`.
-    Operation ancestor lookup is not restarted for these later keys. For
-    example if the payload IR is
+    A lookup is performed for the given `keys` at `target` op - or its closest
+    interface-implementing ancestor - by way of the `DLTIQueryInterface`, which
+    returns an attribute for a key. Each key should be either a (quoted) string
+    or a type. If more than one key is provided, the lookup continues
+    recursively, now on the returned attributes, with the condition that these
+    implement the above interface. For example if the payload IR is
 
     ```
-    module attributes {dlti = #dlti.map<"A" = #dlti.map<"B" = 42 : i32>>} {
+    module attributes {#dlti.map = #dlti.map<#dlti.dl_entry<"A",
+                                     #dlti.map<#dlti.dl_entry<"B", 42: int>>>} {
       func.func private @f()
     }
     ```
-    and we have that `%func` is a Transform handle to op `@f`, then
+    and we have that `%func` is a Tranform handle to op `@f`, then
     `transform.dlti.query ["A", "B"] at %func` returns 42 as a param and
     `transform.dlti.query ["A"] at %func` returns the `#dlti.map` attribute
     containing just the key "B" and its value. Using `["B"]` or `["A","C"]` as
diff --git a/mlir/include/mlir/Dialect/Func/IR/FuncOps.h b/mlir/include/mlir/Dialect/Func/IR/FuncOps.h
index e18a7dc216574a..e6efeb5ee53f95 100644
--- a/mlir/include/mlir/Dialect/Func/IR/FuncOps.h
+++ b/mlir/include/mlir/Dialect/Func/IR/FuncOps.h
@@ -10,7 +10,6 @@
 #define MLIR_DIALECT_FUNC_IR_OPS_H
 
 #include "mlir/Bytecode/BytecodeOpInterface.h"
-#include "mlir/Dialect/DLTI/DLTI.h"
 #include "mlir/Dialect/Func/IR/FuncDialect.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/mlir/include/mlir/Dialect/Func/IR/FuncOps.td b/mlir/include/mlir/Dialect/Func/IR/FuncOps.td
index ba5531c46728e4..a99147b380eb33 100644
--- a/mlir/include/mlir/Dialect/Func/IR/FuncOps.td
+++ b/mlir/include/mlir/Dialect/Func/IR/FuncOps.td
@@ -10,7 +10,6 @@
 #define MLIR_DIALECT_FUNC_IR_FUNCOPS_TD
 
 include "mlir/IR/EnumAttr.td"
-include "mlir/Dialect/DLTI/DLTIOpInterfaces.td"
 include "mlir/IR/OpAsmInterface.td"
 include "mlir/IR/SymbolInterfaces.td"
 include "mlir/Interfaces/CallInterfaces.td"
@@ -257,7 +256,7 @@ def ConstantOp : Func_Op<"constant",
 def FuncOp : Func_Op<"func", [
   AffineScope, AutomaticAllocationScope,
   SymbolName, SymbolVisibility, FunctionOpInterface, IsolatedFromAbove,
-  OpAsmOpInterface, DLTIQueryOpInterface
+  OpAsmOpInterface
 ]> {
   let summary = "An operation with a name containing a single `SSACFG` region";
   let description = [{
@@ -272,10 +271,7 @@ def FuncOp : Func_Op<"func", [
     the region.
 
     Only dialect attribute names may be specified in the attribute dictionaries
-    for function arguments, results, or the function itself. The function may
-    also have an inherent `dlti` attribute implementing `DLTIQueryInterface`.
-    Its values are available to scoped DLTI queries on the function and nested
-    operations, unless a closer scope answers the same key.
+    for function arguments, results, or the function itself.
 
     Example:
 
@@ -306,9 +302,7 @@ def FuncOp : Func_Op<"func", [
                        OptionalAttr<StrAttr>:$sym_visibility,
                        OptionalAttr<DictArrayAttr>:$arg_attrs,
                        OptionalAttr<DictArrayAttr>:$res_attrs,
-                       UnitAttr:$no_inline,
-                       OptionalAttr<DLTIQueryAttr>:$dlti);
-  let useCustomPropertiesEncoding = 1;
+                       UnitAttr:$no_inline);
   let regions = (region AnyRegion:$body);
 
   let builders = [OpBuilder<(ins
diff --git a/mlir/include/mlir/Dialect/GPU/IR/GPUDialect.h b/mlir/include/mlir/Dialect/GPU/IR/GPUDialect.h
index 34ff868db7d446..0d6ea9024c8422 100644
--- a/mlir/include/mlir/Dialect/GPU/IR/GPUDialect.h
+++ b/mlir/include/mlir/Dialect/GPU/IR/GPUDialect.h
@@ -15,7 +15,6 @@
 #define MLIR_DIALECT_GPU_IR_GPUDIALECT_H
 
 #include "mlir/Bytecode/BytecodeOpInterface.h"
-#include "mlir/Dialect/DLTI/DLTI.h"
 #include "mlir/Dialect/DLTI/Traits.h"
 #include "mlir/Dialect/GPU/IR/CompilationInterfaces.h"
 #include "mlir/Dialect/GPU/IR/GPUDialectDecl.h"
diff --git a/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td b/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
index d51bac0317d105..ab5c9e0f476608 100644
--- a/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
+++ b/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
@@ -14,7 +14,6 @@
 #define GPU_OPS
 
 include "mlir/Dialect/DLTI/DLTIBase.td"
-include "mlir/Dialect/DLTI/DLTIOpInterfaces.td"
 include "mlir/Dialect/GPU/IR/GPUBase.td"
 include "mlir/Dialect/GPU/IR/CompilationAttrInterfaces.td"
 include "mlir/Dialect/GPU/IR/CompilationAttrs.td"
@@ -1554,8 +1553,7 @@ def GPU_InitializeNamedBarrierOp
 }
 
 def GPU_GPUModuleOp : GPU_Op<"module", [
-      IsolatedFromAbove, DataLayoutOpInterface, DLTIQueryOpInterface,
-      HasDefaultDLTIDataLayout,
+      IsolatedFromAbove, DataLayoutOpInterface, HasDefaultDLTIDataLayout,
       NoRegionArguments, SymbolTable, SymbolName, SymbolVisibility,
       Symbol] # GraphRegionNoTerminator.traits> {
   let summary = "A top level compilation unit containing code to be run on a GPU.";
@@ -1582,11 +1580,6 @@ def GPU_GPUModuleOp : GPU_Op<"module", [
     attribute will be used during the `gpu-module-to-binary` pass to specify the
     `OffloadingTranslationAttr` used when creating the `gpu.binary` operation.
 
-    A GPU module may also have an inherent `dlti` attribute implementing
-    `DLTIQueryInterface`. It provides values for scoped DLTI queries on the
-    module and its nested operations. In custom assembly, write it as
-    `dlti = #dlti.map<...>` before the optional attribute dictionary.
-
     ```
     gpu.module @symbol_name {
       gpu.func {}
@@ -1614,14 +1607,12 @@ def GPU_GPUModuleOp : GPU_Op<"module", [
       SymbolNameAttr:$sym_name,
       OptionalAttr<StrAttr>:$sym_visibility,
       OptionalAttr<GPUNonEmptyTargetArrayAttr>:$targets,
-      OptionalAttr<OffloadingTranslationAttr>:$offloadingHandler,
-      OptionalAttr<DLTIQueryAttr>:$dlti);
-  let useCustomPropertiesEncoding = 1;
+      OptionalAttr<OffloadingTranslationAttr>:$offloadingHandler);
   let regions = (region SizedRegion<1>:$bodyRegion);
   let assemblyFormat = [{
     ($sym_visibility^)? $sym_name
     (`<` $offloadingHandler^ `>`)?
-    ($targets^)? (`dlti` `=` $dlti^)? attr-dict-with-keyword $bodyRegion
+    ($targets^)? attr-dict-with-keyword $bodyRegion
   }];
 
   // We need to ensure the block inside the region is properly terminated;
diff --git a/mlir/include/mlir/IR/BuiltinDialect.h b/mlir/include/mlir/IR/BuiltinDialect.h
index b7c7a271b07fcf..d06b63da6b892d 100644
--- a/mlir/include/mlir/IR/BuiltinDialect.h
+++ b/mlir/include/mlir/IR/BuiltinDialect.h
@@ -26,7 +26,7 @@ struct BuiltinDialectVersion : public mlir::DialectVersion {
 
   int64_t getVersion() const { return version; }
 
-  static BuiltinDialectVersion getCurrentVersion() { return {1}; }
+  static BuiltinDialectVersion getCurrentVersion() { return {0}; }
 
   bool operator<(const BuiltinDialectVersion &other) const {
     return version < other.version;
diff --git a/mlir/include/mlir/IR/BuiltinOps.td b/mlir/include/mlir/IR/BuiltinOps.td
index 36d381dbb8d393..fb39d50906493c 100644
--- a/mlir/include/mlir/IR/BuiltinOps.td
+++ b/mlir/include/mlir/IR/BuiltinOps.td
@@ -52,16 +52,10 @@ def ModuleOp : Builtin_Op<"module", [
       func.func @foo()
     }
     ```
-
-    A module may have an inherent `dlti` attribute implementing
-    `DLTIQueryInterface`, for example `dlti = #dlti.map<"chip" = "sm_90">`.
-    When the DLTI dialect is loaded, the module implements
-    `DLTIQueryOpInterface` and provides values for scoped DLTI queries.
   }];
 
   let arguments = (ins OptionalAttr<SymbolNameAttr>:$sym_name,
-                       OptionalAttr<StrAttr>:$sym_visibility,
-                       OptionalAttr<DLTIQueryAttr>:$dlti);
+                       OptionalAttr<StrAttr>:$sym_visibility);
   let regions = (region SizedRegion<1>:$bodyRegion);
 
   let assemblyFormat = "($sym_name^)? prop-dict attr-dict-with-keyword $bodyRegion";
@@ -96,7 +90,6 @@ def ModuleOp : Builtin_Op<"module", [
     }
   }];
   let hasVerifier = 1;
-  let useCustomPropertiesEncoding = 1;
 
   // We need to ensure the block inside the region is properly terminated;
   // the auto-generated builders do not guarantee that.
diff --git a/mlir/include/mlir/Interfaces/DataLayoutInterfaces.td b/mlir/include/mlir/Interfaces/DataLayoutInterfaces.td
index a4520dc3df0576..9d35f78b218f8f 100644
--- a/mlir/include/mlir/Interfaces/DataLayoutInterfaces.td
+++ b/mlir/include/mlir/Interfaces/DataLayoutInterfaces.td
@@ -43,12 +43,6 @@ def DLTIQueryInterface : AttrInterface<"DLTIQueryInterface"> {
   ];
 }
 
-def ImplementsDLTIQueryInterface : AttrConstraint<
-    CPred<"::llvm::isa<::mlir::DLTIQueryInterface>($_self)">,
-    "implementing the `DLTIQueryInterface` attr interface">;
-
-def DLTIQueryAttr : ConfinedAttr<AnyAttr, [ImplementsDLTIQueryInterface]>;
-
 def DataLayoutEntryInterface : AttrInterface<"DataLayoutEntryInterface"> {
   let cppNamespace = "::mlir";
 
diff --git a/mlir/include/mlir/Target/LLVMIR/Transforms/Passes.td b/mlir/include/mlir/Target/LLVMIR/Transforms/Passes.td
index 7002333b99976c..c858e9f4c34cb0 100644
--- a/mlir/include/mlir/Target/LLVMIR/Transforms/Passes.td
+++ b/mlir/include/mlir/Target/LLVMIR/Transforms/Passes.td
@@ -28,13 +28,12 @@ def LLVMTargetToDataLayout : Pass<"llvm-target-to-data-layout"> {
 }
 
 def LLVMTargetToTargetFeatures : Pass<"llvm-target-to-target-features"> {
-  let summary = "Derive and store the target's DLTI features";
-  let dependentDialects = ["mlir::DLTIDialect"];
+  let summary = "Update attached #llvm.target's features per the described target";
   let description = [{
     Obtain the TargetMachine specified by the attached #llvm.target's attributes
-    and obtain from it the full list of features of the selected target. Stores
-    the resulting features under the `features` key of the operation's DLTI
-    map.
+    and obtain from it the full list of features of the selected target. Updates
+    the attached #llvm.target so that its features reflect the full list of
+    features.
   }];
   let options = [
     Option<"initializeLLVMTargets", "initialize-llvm-targets", "bool",
diff --git a/mlir/lib/Dialect/DLTI/CMakeLists.txt b/mlir/lib/Dialect/DLTI/CMakeLists.txt
index 5c366122f25a1b..7ae80f9e913bb3 100644
--- a/mlir/lib/Dialect/DLTI/CMakeLists.txt
+++ b/mlir/lib/Dialect/DLTI/CMakeLists.txt
@@ -6,7 +6,6 @@ add_mlir_dialect_library(MLIRDLTIDialect
   DEPENDS
   MLIRDLTIIncGen
   MLIRDLTIAttrsIncGen
...
[truncated]

``````````

</details>


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


More information about the Mlir-commits mailing list