<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/unittests/Bitcode/DataLayoutUpgradeTest.cpp, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[AMDGPU] Set AS8 address width to 48 bits</title>
<updated>2025-05-20T00:26:05+00:00</updated>
<author>
<name>Alexander Richardson</name>
<email>alexrichardson@google.com</email>
</author>
<published>2025-05-20T00:26:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=07e2ba445df7d277e5195c0ec85b133735ea76e3'/>
<id>07e2ba445df7d277e5195c0ec85b133735ea76e3</id>
<content type='text'>
Of the 128-bits of buffer descriptor only 48 bits are address bits, so
following the discussion on https://discourse.llvm.org/t/clarifiying-the-semantics-of-ptrtoint/83987/54,
the logic conclusion is to set the index width to 48 bits instead of
the current value of 128.

Most of the test changes are mechanical datalayout updates, but there
is one actual change: the ptrmask test now uses .i48 instead of .i128
and I had to update SelectionDAGBuilder to correctly extend the mask.

Reviewed By: krzysz00

Pull Request: https://github.com/llvm/llvm-project/pull/139419
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Of the 128-bits of buffer descriptor only 48 bits are address bits, so
following the discussion on https://discourse.llvm.org/t/clarifiying-the-semantics-of-ptrtoint/83987/54,
the logic conclusion is to set the index width to 48 bits instead of
the current value of 128.

Most of the test changes are mechanical datalayout updates, but there
is one actual change: the ptrmask test now uses .i48 instead of .i128
and I had to update SelectionDAGBuilder to correctly extend the mask.

Reviewed By: krzysz00

Pull Request: https://github.com/llvm/llvm-project/pull/139419
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Add `-i128:128` to the `datalayout` string. (#119204)</title>
<updated>2024-12-10T17:21:58+00:00</updated>
<author>
<name>Dan Gohman</name>
<email>dev@sunfishcode.online</email>
</author>
<published>2024-12-10T17:21:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c5ab70c508457eaece5d7ff4ab79a2f90bc67f06'/>
<id>c5ab70c508457eaece5d7ff4ab79a2f90bc67f06</id>
<content type='text'>
Clang [defaults to aligning `__int128_t` to 16 bytes], while LLVM
`datalayout` strings [default to aligning `i128` to 8 bytes]. Wasm is
currently using the defaults for both, so it's inconsistent. Fix this by
adding `-i128:128` to Wasm's `datalayout` string so that it aligns
`i128` to 16 bytes too.

This is similar to
[llvm/llvm-project@dbad963](https://github.com/llvm/llvm-project/commit/dbad963a69fd7b16c6838f81b61167fbf00a413c)
for SPARC.

This fixes rust-lang/rust#133991; see that issue for further discussion.

[defaults to aligning `__int128_t` to 16 bytes]:
https://github.com/llvm/llvm-project/blob/f8b4182f076f8fe55f9d5f617b5a25008a77b22f/clang/lib/Basic/TargetInfo.cpp#L77
[default to aligning `i128` to 8 bytes]:
https://llvm.org/docs/LangRef.html#langref-datalayout</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clang [defaults to aligning `__int128_t` to 16 bytes], while LLVM
`datalayout` strings [default to aligning `i128` to 8 bytes]. Wasm is
currently using the defaults for both, so it's inconsistent. Fix this by
adding `-i128:128` to Wasm's `datalayout` string so that it aligns
`i128` to 16 bytes too.

This is similar to
[llvm/llvm-project@dbad963](https://github.com/llvm/llvm-project/commit/dbad963a69fd7b16c6838f81b61167fbf00a413c)
for SPARC.

This fixes rust-lang/rust#133991; see that issue for further discussion.

[defaults to aligning `__int128_t` to 16 bytes]:
https://github.com/llvm/llvm-project/blob/f8b4182f076f8fe55f9d5f617b5a25008a77b22f/clang/lib/Basic/TargetInfo.cpp#L77
[default to aligning `i128` to 8 bytes]:
https://llvm.org/docs/LangRef.html#langref-datalayout</pre>
</div>
</content>
</entry>
<entry>
<title>[PowerPC] Update data layout aligment of i128 to 16 (#118004)</title>
<updated>2024-12-09T23:02:24+00:00</updated>
<author>
<name>Lei Huang</name>
<email>lei@ca.ibm.com</email>
</author>
<published>2024-12-09T23:02:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a13ec9cd54deba3a6779ce1114503cf86a3f8658'/>
<id>a13ec9cd54deba3a6779ce1114503cf86a3f8658</id>
<content type='text'>
Fix 64-bit PowerPC part of
https://github.com/llvm/llvm-project/issues/102783.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix 64-bit PowerPC part of
https://github.com/llvm/llvm-project/issues/102783.</pre>
</div>
</content>
</entry>
<entry>
<title>[MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (#112084)</title>
<updated>2024-11-06T15:14:30+00:00</updated>
<author>
<name>yingopq</name>
<email>115543042+yingopq@users.noreply.github.com</email>
</author>
<published>2024-11-06T15:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=86e4beb702fde407a35938a1c37279a61c0291e7'/>
<id>86e4beb702fde407a35938a1c37279a61c0291e7</id>
<content type='text'>
Fix parts of #102783.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix parts of #102783.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][aarch64] Add support for the MSVC qualifiers __ptr32, __ptr64, __sptr, __uptr for AArch64 (#111879)</title>
<updated>2024-10-15T17:37:36+00:00</updated>
<author>
<name>Daniel Paoliello</name>
<email>danpao@microsoft.com</email>
</author>
<published>2024-10-15T17:37:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c9f27275c1330a325661bdf14fb3bc444a5e3648'/>
<id>c9f27275c1330a325661bdf14fb3bc444a5e3648</id>
<content type='text'>
MSVC has a set of qualifiers to allow using 32-bit signed/unsigned
pointers when building 64-bit targets. This is useful for WoW code
(i.e., the part of Windows that handles running 32-bit application on a
64-bit OS). Currently this is supported on x64 using the 270, 271 and
272 address spaces, but does not work for AArch64 at all.

This change adds the same 270, 271 and 272 address spaces to AArch64 and
adjusts the data layout string accordingly. Clang will generate the
correct address space casts, but these will currently be ignored until
the AArch64 backend is updated to handle them.

Partially fixes #62536

This is a resurrected version of &lt;https://reviews.llvm.org/D158857&gt;
(originally created by @a_vorobev) - I've cleaned it up a little, fixed
the rest of the tests and added to auto-upgrade for the data layout.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MSVC has a set of qualifiers to allow using 32-bit signed/unsigned
pointers when building 64-bit targets. This is useful for WoW code
(i.e., the part of Windows that handles running 32-bit application on a
64-bit OS). Currently this is supported on x64 using the 270, 271 and
272 address spaces, but does not work for AArch64 at all.

This change adds the same 270, 271 and 272 address spaces to AArch64 and
adjusts the data layout string accordingly. Clang will generate the
correct address space casts, but these will currently be ignored until
the AArch64 backend is updated to handle them.

Partially fixes #62536

This is a resurrected version of &lt;https://reviews.llvm.org/D158857&gt;
(originally created by @a_vorobev) - I've cleaned it up a little, fixed
the rest of the tests and added to auto-upgrade for the data layout.</pre>
</div>
</content>
</entry>
<entry>
<title>[SPARC] Align i128 to 16 bytes in SPARC datalayouts (#106951)</title>
<updated>2024-09-30T01:32:33+00:00</updated>
<author>
<name>Koakuma</name>
<email>koachan@protonmail.com</email>
</author>
<published>2024-09-30T01:32:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dbad963a69fd7b16c6838f81b61167fbf00a413c'/>
<id>dbad963a69fd7b16c6838f81b61167fbf00a413c</id>
<content type='text'>
Align i128s to 16 bytes, following the example at
https://reviews.llvm.org/D86310.

clang already does this implicitly, but do it in backend code too for
the benefit of other frontends (see e.g
https://github.com/llvm/llvm-project/issues/102783 &amp;
https://github.com/rust-lang/rust/issues/128950).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Align i128s to 16 bytes, following the example at
https://reviews.llvm.org/D86310.

clang already does this implicitly, but do it in backend code too for
the benefit of other frontends (see e.g
https://github.com/llvm/llvm-project/issues/102783 &amp;
https://github.com/rust-lang/rust/issues/128950).</pre>
</div>
</content>
</entry>
<entry>
<title>[LoongArch] Adjust LA64 data layout by using n32:64 in layout string (#93814)</title>
<updated>2024-06-06T06:05:56+00:00</updated>
<author>
<name>hev</name>
<email>wangrui@loongson.cn</email>
</author>
<published>2024-06-06T06:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=46edc02eaac81bfdace3e1f906751cad114790da'/>
<id>46edc02eaac81bfdace3e1f906751cad114790da</id>
<content type='text'>
Although i32 type is illegal in the backend, LA64 has pretty good
support for i32 types by using W instructions.

By adding n32 to the DataLayout string, middle end optimizations will
consider i32 to be a native type. One known effect of this is enabling
LoopStrengthReduce on loops with i32 induction variables. This can be
beneficial because C/C++ code often has loops with i32 induction
variables due to the use of `int` or `unsigned int`.

If this patch exposes performance issues, those are better addressed by
tuning LSR or other passes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Although i32 type is illegal in the backend, LA64 has pretty good
support for i32 types by using W instructions.

By adding n32 to the DataLayout string, middle end optimizations will
consider i32 to be a native type. One known effect of this is enabling
LoopStrengthReduce on loops with i32 induction variables. This can be
beneficial because C/C++ code often has loops with i32 induction
variables due to the use of `int` or `unsigned int`.

If this patch exposes performance issues, those are better addressed by
tuning LSR or other passes.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang backend] In AArch64's DataLayout, specify a minimum function alignment of 4. (#90702)</title>
<updated>2024-05-06T02:05:15+00:00</updated>
<author>
<name>Doug Wyatt</name>
<email>doug@sonosphere.com</email>
</author>
<published>2024-05-06T02:05:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ddecadabebdd4b301bd65534b58009e57ac1bbe5'/>
<id>ddecadabebdd4b301bd65534b58009e57ac1bbe5</id>
<content type='text'>
This addresses an issue where the explicit alignment of 2 (for C++ ABI
reasons) was being propagated to the back end and causing under-aligned
functions (in special sections).

This is an alternate approach suggested by @efriedma-quic in PR #90415.

Fixes #90358</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This addresses an issue where the explicit alignment of 2 (for C++ ABI
reasons) was being propagated to the back end and causing under-aligned
functions (in special sections).

This is an alternate approach suggested by @efriedma-quic in PR #90415.

Fixes #90358</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][CodeGen] Add AS for Globals to SPIR &amp; SPIRV datalayouts (#88455)</title>
<updated>2024-04-16T10:37:29+00:00</updated>
<author>
<name>Alex Voicu</name>
<email>alexandru.voicu@amd.com</email>
</author>
<published>2024-04-16T10:37:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1120d8e6f799121b611aa23bdc128e40cf9c6c58'/>
<id>1120d8e6f799121b611aa23bdc128e40cf9c6c58</id>
<content type='text'>
Currently neither the SPIR nor the SPIRV targets specify the AS for
globals in their datalayout strings. This is problematic because
CodeGen/LLVM will default to AS0 in this case, which produces Globals
that end up in the private address space for e.g. OCL, HIPSPV or SYCL.
This patch addresses it by completing the datalayout string.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently neither the SPIR nor the SPIRV targets specify the AS for
globals in their datalayout strings. This is problematic because
CodeGen/LLVM will default to AS0 in this case, which produces Globals
that end up in the private address space for e.g. OCL, HIPSPV or SYCL.
This patch addresses it by completing the datalayout string.</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU] - Add address space for strided buffers (#74471)</title>
<updated>2023-12-15T14:49:25+00:00</updated>
<author>
<name>Jessica Del</name>
<email>50999226+OutOfCache@users.noreply.github.com</email>
</author>
<published>2023-12-15T14:49:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=32f9983c064557883223b585810eac3c6797d500'/>
<id>32f9983c064557883223b585810eac3c6797d500</id>
<content type='text'>
This is an experimental address space for strided buffers. These buffers
can have structs as elements and
a stride &gt; 1.
These pointers allow the indexed access in units of stride, i.e., they
point at `buffer[index * stride]`.
Thus, we can use the `idxen` modifier for buffer loads.

We assign address space 9 to 192-bit buffer pointers which contain a
128-bit descriptor, a 32-bit offset and a 32-bit index. Essentially,
they are fat buffer pointers with an additional 32-bit index.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an experimental address space for strided buffers. These buffers
can have structs as elements and
a stride &gt; 1.
These pointers allow the indexed access in units of stride, i.e., they
point at `buffer[index * stride]`.
Thus, we can use the `idxen` modifier for buffer loads.

We assign address space 9 to 192-bit buffer pointers which contain a
128-bit descriptor, a 32-bit offset and a 32-bit index. Essentially,
they are fat buffer pointers with an additional 32-bit index.</pre>
</div>
</content>
</entry>
</feed>
