[llvm-dev] New attribute added to DataLayout: globals address space
Alexander Richardson via llvm-dev
llvm-dev at lists.llvm.org
Sat Nov 21 05:02:10 PST 2020
Hello all,
I committed https://reviews.llvm.org/D84345 yesterday, which adds a
new "-G<N>" field to the DataLayout and specifies the address space
that LLVM passes should use when creating new global variables if
there is no additional contextual information.
This change is required to improve support for targets that don't use
address space zero for globals (e.g. the CHERI RISC-V/MIPS targets and
Arm Morello) and is required to remove uses of
PointerType::getUnqual() and similar functions
(http://lists.llvm.org/pipermail/llvm-dev/2020-July/143638.html).
This change should be fully backwards compatible: if your target
doesn't specify "-G" in the datalayout string all globals will be
created in AS0 as usual.
Please let me know if you have any concerns about this change.
Thanks,
Alex
More information about the llvm-dev
mailing list