[Mlir-commits] [mlir] [MLIR][LLVM] Allow importing of nameless globals (PR #101918)

Christian Ulmann llvmlistbot at llvm.org
Sun Aug 4 20:26:55 PDT 2024


================
@@ -280,7 +280,20 @@ define void @bar() {
 ; CHECK-DAG: #[[GLOBAL_VAR:.*]] = #llvm.di_global_variable<file = #[[FILE]], line = 268, type = #[[COMPOSITE_TYPE]], isLocalToUnit = true, isDefined = true>
 ; CHECK-DAG: #[[GLOBAL_VAR_EXPR:.*]] = #llvm.di_global_variable_expression<var = #[[GLOBAL_VAR]], expr = <>>
 
-; CHECK-DAG: llvm.mlir.global external constant @".str.1"() {addr_space = 0 : i32, dbg_expr = #[[GLOBAL_VAR_EXPR]]}
+; CHECK:  llvm.mlir.global private unnamed_addr constant @mlir.llvm.nameless_global.0("0\00") {addr_space = 0 : i32, dso_local}
----------------
Dinistro wrote:

```suggestion
; CHECK:  llvm.mlir.global private unnamed_addr constant @mlir.llvm.nameless_global.0("0\00")
```
Ultra nit: I suggest to strip away some of the irrelevant attributes. 

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


More information about the Mlir-commits mailing list