[Mlir-commits] [mlir] [MLIR][DLTI] Enable types as keys in DLTI-query utils (PR #105995)

Rolf Morel llvmlistbot at llvm.org
Sun Aug 25 16:31:58 PDT 2024


================
@@ -17,6 +17,60 @@ module attributes {transform.with_named_sequence} {
 
 // -----
 
+// expected-remark @below {{associated attr 42 : i32}}
+module attributes { test.dlti = #dlti.map<#dlti.dl_entry<i32, 42 : i32>>} {
----------------
rolfmorel wrote:

The point was to demonstrate you can associate any attribute to a type. A more useful usage of this is to have another map which contains properties of the type. This properties map could then reoccur for different types, with different values per type.

I don't think we should restrict `#dlti.map` to only certain usages of key-value pairs: it is intentionally as generic (and hence unconstrained) as possible. Instead someone might want adjust `#dlti.dl_spec` to make sure only certain properties of types get mentioned. Or introduce another DLTI map-like attribute that specifies which properties of types one is allowed to talk about. 

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


More information about the Mlir-commits mailing list