[Mlir-commits] [mlir] [mlir] Add the concept of ASM dialect aliases (PR #86033)

Fabian Mora llvmlistbot at llvm.org
Thu Mar 21 02:43:32 PDT 2024


================
@@ -21,6 +21,12 @@
 // CHECK-DAG: !test_tuple = tuple<!test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla>
 "test.op"() {alias_test = "alias_test:large_tuple"} : () -> (tuple<!test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla, !test.smpla>)
 
+// CHECK-DAG: #test.test_string<"hello">, #test.test_string<" world">
+"test.op"() {alias_test = ["test_dialect_alias:hello", "test_dialect_alias: world"]} : () -> ()
----------------
fabianmcg wrote:

Technically, yes. However, what it truly allows is hijacking any attribute and type's representation with a custom printer and parsers by a dialect.
For example, test could decide
`#test.ones<2, f32>` alias to `[1.: f32, 1.: f32]`.


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


More information about the Mlir-commits mailing list