[PATCH] D70947: Add a default address space for globals to DataLayout

Dylan McKay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 09:28:57 PDT 2020


dylanmckay added inline comments.


================
Comment at: llvm/lib/IR/Globals.cpp:369
+                       ? *AddressSpace
+                       : M.getDataLayout().getDefaultGlobalsAddressSpace()),
       isConstantGlobal(constant),
----------------
dylanmckay wrote:
> dylanmckay wrote:
> > Can we add a test that global variables do indeed get initialized with the address space specified in the DataLayout?
> > 
> > For example, compile under X86 but with `G7` in the data layout, then assert `addrspace(7)` in the IR output.
> > 
> > I think every other code path is covered.
> > Can we add a test that global variables do indeed get initialized with the address space specified in the DataLayout?
> > 
> > For example, compile under X86 but with `G7` in the data layout, then assert `addrspace(7)` in the IR output.
> > 
> > I think every other code path is covered.
> 
> 
I can't mark these two existing inline comments as done but note that they have been resolved.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70947/new/

https://reviews.llvm.org/D70947



More information about the llvm-commits mailing list