[Mlir-commits] [mlir] [MLIR] Fix duplicated attribute nodes in MLIR bytecode deserialization (PR #151267)
Mehdi Amini
llvmlistbot at llvm.org
Thu Jul 31 04:08:12 PDT 2025
================
@@ -0,0 +1,32 @@
+// RUN: mlir-opt -emit-bytecode %s | mlir-translate --mlir-to-llvmir | FileCheck %s
+
+#di_basic_type = #llvm.di_basic_type<tag = DW_TAG_base_type, name = "int", sizeInBits = 32, encoding = DW_ATE_signed>
+#di_file = #llvm.di_file<"foo.c" in "/mlir/">
+#di_file1 = #llvm.di_file<"foo.c" in "/mlir/">
+#di_subprogram = #llvm.di_subprogram<recId = distinct[0]<>, isRecSelf = true>
+#di_compile_unit = #llvm.di_compile_unit<id = distinct[1]<>, sourceLanguage = DW_LANG_C11, file = #di_file, producer = "MLIR", isOptimized = true, emissionKind = Full, nameTableKind = None>
+#di_local_variable = #llvm.di_local_variable<scope = #di_subprogram, name = "a", file = #di_file1, line = 2, type = #di_basic_type>
+#di_subroutine_type = #llvm.di_subroutine_type<types = #di_basic_type>
+#di_subprogram1 = #llvm.di_subprogram<recId = distinct[0]<>, id = distinct[2]<>, compileUnit = #di_compile_unit, scope = #di_file1, name = "main", file = #di_file1, line = 1, scopeLine = 1, subprogramFlags = "Definition|Optimized", type = #di_subroutine_type, retainedNodes = #di_local_variable>
+#di_local_variable1 = #llvm.di_local_variable<scope = #di_subprogram1, name = "a", file = #di_file1, line = 2, type = #di_basic_type>
+
+module attributes {dlti.dl_spec = #dlti.dl_spec<i64 = dense<64> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>>, llvm.ident = "MLIR", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
----------------
joker-eph wrote:
Can we check this as a round-tripping to MLIR targeted kind of test (with minimal attribute to show the discrepancy) instead of involving a translation to LLVM IR and relying on the specific of DI.
https://github.com/llvm/llvm-project/pull/151267
More information about the Mlir-commits
mailing list