[Mlir-commits] [mlir] [MLIR][LLVM] Fix nameless global import to support use before def case (PR #111797)

Tobias Gysi llvmlistbot at llvm.org
Thu Oct 10 00:29:54 PDT 2024


================
@@ -355,6 +355,9 @@ class ModuleImport {
   /// and stores a mapping from the struct to the symbol pointing to the
   /// translated operation.
   void processComdat(const llvm::Comdat *comdat);
+  /// Returns a symbol name for a nameless global. MLIR, in contrast to LLVM,
+  /// always requires a symbol name.
+  FlatSymbolRefAttr getOrCreateFakeSymbolName(llvm::GlobalVariable *globalVar);
----------------
gysit wrote:

```suggestion
  FlatSymbolRefAttr getOrCreateNamelessSymbolName(llvm::GlobalVariable *globalVar);
```
I think I would go with getOrCreateNamelessSymbolName since Fake has a somewhat negative connotation.

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


More information about the Mlir-commits mailing list