[Mlir-commits] [mlir] [MLIR][LLVM] Implement LLVM dialect support for global aliases (PR #125295)
Christian Ulmann
llvmlistbot at llvm.org
Mon Feb 3 23:55:05 PST 2025
================
@@ -1135,9 +1145,32 @@ LogicalResult ModuleTranslation::convertGlobals() {
}
}
- // Convert global variable bodies. This is done after all global variables
- // have been created in LLVM IR because a global body may refer to another
- // global or itself. So all global variables need to be mapped first.
+ // Create all llvm::GlobalAlias
+ for (auto op : getModuleBody(mlirModule).getOps<LLVM::AliasOp>()) {
+ llvm::Type *type = convertType(op.getType());
+ llvm::Constant *cst = nullptr;
+ auto linkage = convertLinkageToLLVM(op.getLinkage());
----------------
Dinistro wrote:
Nit: No auto
https://github.com/llvm/llvm-project/pull/125295
More information about the Mlir-commits
mailing list