<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src, branch lcnr/rustc-dev-guide</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=lcnr/rustc-dev-guide</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=lcnr/rustc-dev-guide'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-08-13T16:43:02+00:00</updated>
<entry>
<title>Rollup merge of #145241 - tomtor:avr-layout, r=nikic</title>
<updated>2025-08-13T16:43:02+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2025-08-13T16:43:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a6146fddcf87653df30cb3b8a99ce2784b4de055'/>
<id>urn:sha1:a6146fddcf87653df30cb3b8a99ce2784b4de055</id>
<content type='text'>
[AVR] Changed data_layout

This change is required when

https://github.com/llvm/llvm-project/commit/97f0ff0c80407adee693436b44e55ededfcd5435

gets included in the Rust llvm tree, because it changes the AVR data-layout
</content>
</entry>
<entry>
<title>Auto merge of #145093 - nikic:dead-on-return, r=nnethercote</title>
<updated>2025-08-13T04:18:43+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-08-13T04:18:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b1b26b834d85e84b46aa8f8f3ce210a1627aa85f'/>
<id>urn:sha1:b1b26b834d85e84b46aa8f8f3ce210a1627aa85f</id>
<content type='text'>
Set dead_on_return attribute for indirect arguments

Set the dead_on_return attribute (added in LLVM 21) for arguments that are passed indirectly, but not byval.

This indicates that the value of the argument on return does not matter, enabling additional dead store elimination.

From LangRef:

&gt; This attribute indicates that the memory pointed to by the argument is dead upon function return, both upon normal return and if the calls unwinds, meaning that the caller will not depend on its contents. Stores that would be observable either on the return path or on the unwind path may be elided.
&gt;
&gt; Specifically, the behavior is as-if any memory written through the pointer during the execution of the function is overwritten with a poison value upon function return. The caller may access the memory, but any load not preceded by a store will return poison.
&gt;
&gt; This attribute does not imply aliasing properties. For pointer arguments that do not alias other memory locations, noalias attribute may be used in conjunction. Conversely, this attribute always implies dead_on_unwind.
&gt;
&gt; This attribute cannot be applied to return values.

This fixes parts of https://github.com/rust-lang/rust/issues/96497.
</content>
</entry>
<entry>
<title>[AVR] Changed data_layout</title>
<updated>2025-08-12T06:33:27+00:00</updated>
<author>
<name>Tom Vijlbrief</name>
<email>tvijlbrief@gmail.com</email>
</author>
<published>2025-08-11T09:19:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2563e4a7ffe47e93c69283c14e6d660b08834cf1'/>
<id>urn:sha1:2563e4a7ffe47e93c69283c14e6d660b08834cf1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Set dead_on_return attribute for indirect arguments</title>
<updated>2025-08-11T10:39:23+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-08-08T10:39:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ebef9d7f6387fb0541a0dab48d1cd1f86556df04'/>
<id>urn:sha1:ebef9d7f6387fb0541a0dab48d1cd1f86556df04</id>
<content type='text'>
Set the dead_on_return attribute (added in LLVM 21) for arguments
that are passed indirectly, but not byval.

This indicates that the value of the argument on return does not
matter, enabling additional dead store elimination.
</content>
</entry>
<entry>
<title>Stop using uadd.with.overflow</title>
<updated>2025-08-09T04:59:28+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2025-08-09T04:59:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8831c5b9946561a37dc7ee6fd826ef1470e8f380'/>
<id>urn:sha1:8831c5b9946561a37dc7ee6fd826ef1470e8f380</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #144987 - tgross35:llvm21-f16-f128, r=nikic</title>
<updated>2025-08-08T19:22:47+00:00</updated>
<author>
<name>Trevor Gross</name>
<email>t.gross35@gmail.com</email>
</author>
<published>2025-08-08T19:22:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=660bf919dc5dec96d319cce59702b0355bd8452c'/>
<id>urn:sha1:660bf919dc5dec96d319cce59702b0355bd8452c</id>
<content type='text'>
Enable f16 and f128 on targets that were fixed in LLVM21

LLVM21 fixed the new float types on a number of targets:

* SystemZ gained f16 support  https://github.com/llvm/llvm-project/pull/109164
* Hexagon now uses soft f16 to avoid recursion bugs  https://github.com/llvm/llvm-project/pull/130977
* Mips now correctly handles f128 (actually since LLVM20) https://github.com/llvm/llvm-project/pull/117525
* f128 is now correctly aligned when passing the stack on x86  https://github.com/llvm/llvm-project/pull/138092

Thus, enable the types on relevant targets for LLVM &gt; 21.0.0.

NVPTX also gained handling of f128 as a storage type, but it lacks support for basic math operations so is still disabled here.

try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-i686-linux
try-job: dist-i686-msvc
try-job: dist-s390x-linux
try-job: dist-various-1
try-job: dist-various-2
try-job: dist-x86_64-linux
try-job: i686-gnu-1
try-job: i686-gnu-2
try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: test-various
</content>
</entry>
<entry>
<title>Rollup merge of #144192 - RalfJung:atomicrmw-ptr, r=nikic</title>
<updated>2025-08-08T19:22:44+00:00</updated>
<author>
<name>Trevor Gross</name>
<email>t.gross35@gmail.com</email>
</author>
<published>2025-08-08T19:22:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6fa6a854cd791e9efa813e9b18cd1a5337ded971'/>
<id>urn:sha1:6fa6a854cd791e9efa813e9b18cd1a5337ded971</id>
<content type='text'>
atomicrmw on pointers: move integer-pointer cast hacks into backend

Conceptually, we want to have atomic operations on pointers of the form `fn atomic_add(ptr: *mut T, offset: usize, ...)`. However, LLVM does not directly support such operations (https://github.com/llvm/llvm-project/issues/120837), so we have to cast the `offset` to a pointer somewhere.

This PR moves that hack into the LLVM backend, so that the standard library, intrinsic, and Miri all work with the conceptual operation we actually want. Hopefully, one day LLVM will gain a way to represent these operations without integer-pointer casts, and then the hack will disappear entirely.

Cc ```@nikic``` -- this is the best we can do right now, right?
Fixes https://github.com/rust-lang/rust/issues/134617
</content>
</entry>
<entry>
<title>Rollup merge of #145051 - bjorn3:prevent_linkage_symbol_name_collision, r=petrochenkov</title>
<updated>2025-08-08T02:52:57+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-08-08T02:52:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=432a4f27fe5f1703af0277cd6b2e855ec47996f4'/>
<id>urn:sha1:432a4f27fe5f1703af0277cd6b2e855ec47996f4</id>
<content type='text'>
Prevent name collisions with internal implementation details

The implementation of the linkage attribute inside extern blocks defines symbols starting with _rust_extern_with_linkage_. If someone tries to also define this symbol you will get a symbol conflict or even an ICE. By adding an unpredictable component to the symbol name, this becomes less of an issue.

Spawned from the discussion at [#t-compiler &gt; About static variables &amp;#96;_rust_extern_with_linkage_&amp;#42;&amp;#96;](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/About.20static.20variables.20.60_rust_extern_with_linkage_*.60) cc `@ywxt`

Fixes https://github.com/rust-lang/rust/issues/144940
</content>
</entry>
<entry>
<title>Rollup merge of #144999 - Zalathar:remove-mcdc, r=oli-obk</title>
<updated>2025-08-08T02:52:54+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-08-08T02:52:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=562222b73765a326fa800a075814deaf627874df'/>
<id>urn:sha1:562222b73765a326fa800a075814deaf627874df</id>
<content type='text'>
coverage: Remove all unstable support for MC/DC instrumentation

Preliminary support for a partial implementation of “Modified Condition/Decision Coverage” instrumentation was added behind the unstable flag `-Zcoverage-options=mcdc` in 2024. These are the most substantial PRs involved:

- rust-lang/rust#123409
- rust-lang/rust#126733

At the time, I accepted these PRs with relatively modest scrutiny, because I did not want to stand in the way of independent work on MC/DC instrumentation. My hope was that ongoing work by interested contributors would lead to the code becoming clearer and more maintainable over time.

---

However, that MC/DC code has proven itself to be a major burden on overall maintenance of coverage instrumentation, and a major obstacle to other planned improvements, such as internal changes needed for proper support of macro expansion regions.

I have also become reluctant to accept any further MC/DC-related changes that would increase this burden.

That tension has resulted in an unhappy impasse. On one hand, the present MC/DC implementation is not yet complete, and shows little sign of being complete at an acceptable level of code quality in the foreseeable future. On the other hand, the continued existence of this partial MC/DC implementation is imposing serious maintenance burdens on every other aspect of coverage instrumentation, and is preventing some of the very improvements that would make it easier to accept expanded MC/DC support in the future.

While I know this will be disappointing to some, I think the healthy way forward is accept that I made the wrong call in accepting the current implementation, and to remove it entirely from the compiler.
</content>
</entry>
<entry>
<title>Enable f16 and f128 on targets that were fixed in LLVM21</title>
<updated>2025-08-07T20:34:49+00:00</updated>
<author>
<name>Trevor Gross</name>
<email>tmgross@umich.edu</email>
</author>
<published>2025-08-06T08:57:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cdb299c0d8463d7e66b680e93c8d0d7258fc7643'/>
<id>urn:sha1:cdb299c0d8463d7e66b680e93c8d0d7258fc7643</id>
<content type='text'>
LLVM21 fixed the new float types on a number of targets:

* SystemZ gained f16 support
  https://github.com/llvm/llvm-project/pull/109164
* Hexagon now uses soft f16 to avoid recursion bugs
  https://github.com/llvm/llvm-project/pull/130977
* Mips now correctly handles f128 (actually since LLVM20)
  https://github.com/llvm/llvm-project/pull/117525
* f128 is now correctly aligned when passing the stack on x86
  https://github.com/llvm/llvm-project/pull/138092

Thus, enable the types on relevant targets for LLVM &gt; 21.0.0.

NVPTX also gained handling of f128 as a storage type, but it lacks
support for basic math operations so is still disabled here.
</content>
</entry>
</feed>
