[llvm-dev] New attribute added to DataLayout: globals address space

Eric Christopher via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 8 12:34:20 PST 2020


Hi Alex,

I think my only concern here is that this affects forward compatibility - I
don't think there's anything to be done about it, but it does mean that
existing installed libraries will fail to read even the most basic of newer
modules with this change and worth calling out explicitly.

-eric

On Sat, Nov 21, 2020 at 8:02 AM Alexander Richardson <
Alexander.Richardson at cl.cam.ac.uk> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201208/87e7b16a/attachment.html>


More information about the llvm-dev mailing list