[flang-commits] [flang] [Flang] Set address space during FIR pointer-like types lowering (PR #69599)

via flang-commits flang-commits at lists.llvm.org
Wed Jan 17 07:07:34 PST 2024


================
@@ -35,7 +35,13 @@ LLVMTypeConverter::LLVMTypeConverter(mlir::ModuleOp module, bool applyTBAA,
                                       getTargetTriple(module),
                                       getKindMapping(module), dl)),
       tbaaBuilder(std::make_unique<TBAABuilder>(module->getContext(), applyTBAA,
-                                                forceUnifiedTBAATree)) {
+                                                forceUnifiedTBAATree)),
+      addressSpace(0) {
----------------
agozillon wrote:

Perhaps a good idea to rename this to allocaAddressSpace, rather than addresSspace, as there's a few different types of address space that can be stored in the data layout! 

The getAddressSpace function could also be renamed to getAllocaAddressSpace, but you will probably get the variations I have in the other address space related PR we've made soon on a rebase (hopefully it'll land without any issue, if not can always just take them directly from the PR).

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


More information about the flang-commits mailing list