[llvm] [WIP] Extend data layout to add non zero null value for address space. (PR #83109)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 00:48:33 PDT 2024
================
@@ -3044,6 +3044,14 @@ as follows:
``n32:64`` for PowerPC 64, or ``n8:16:32:64`` for X86-64. Elements of
this set are considered to support most general arithmetic operations
efficiently.
+``z[n]:<value>``
+ This specifies the default null value for an address space. ``n`` denotes
+ the address space number, and if not specified, it is considered to be
+ for the unlisted address space. For unlisted address space, the default
+ null value is ``0``. ``value`` denotes the default null value for an
+ address space ``n``. To represent negatives values, prefix ``neg`` is
+ added to ``value``. for e.g., ``z0:neg1`` represents for ``0`` address
----------------
Pierre-vh wrote:
I'm really wondering if we should prevent modifying the 0 address space.
It seems like it's kind of special, for instance it cannot be marked non integral in the data layout. I think it's fair for a pass to assume zero is the null value if (AS == 0) as it's always the case for every target (AFAIK), so I'd enforce it in the DL.
https://github.com/llvm/llvm-project/pull/83109
More information about the llvm-commits
mailing list