<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_ssa/src, branch beta</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=beta</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=beta'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-09-13T13:59:48+00:00</updated>
<entry>
<title>Auto merge of #145186 - camsteffen:assoc-impl-kind, r=petrochenkov</title>
<updated>2025-09-13T13:59:48+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-09-13T13:59:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=637b50be01093962ac6f4432d6881ab41d6d90b4'/>
<id>urn:sha1:637b50be01093962ac6f4432d6881ab41d6d90b4</id>
<content type='text'>
Make `AssocItem` aware of its impl kind

The general goal is to have fewer query dependencies by making `AssocItem` aware of its parent impl kind (inherent vs. trait) without having to query the parent def_kind.

See individual commits.
</content>
</entry>
<entry>
<title>Introduce trait_item_of</title>
<updated>2025-09-12T20:10:30+00:00</updated>
<author>
<name>Cameron Steffen</name>
<email>cam.steffen94@gmail.com</email>
</author>
<published>2025-08-15T21:12:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=16c218c57ff83c82ba58753c3a67f697e260adc1'/>
<id>urn:sha1:16c218c57ff83c82ba58753c3a67f697e260adc1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add --print target-spec-json-schema</title>
<updated>2025-09-12T18:53:28+00:00</updated>
<author>
<name>Noratrieb</name>
<email>48135649+Noratrieb@users.noreply.github.com</email>
</author>
<published>2025-07-26T10:39:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f157ce994ea45e9faea9eff89c5f8b3d4ea77b6e'/>
<id>urn:sha1:f157ce994ea45e9faea9eff89c5f8b3d4ea77b6e</id>
<content type='text'>
This schema is helpful for people writing custom target spec JSON. It
can provide autocomplete in the editor, and also serves as documentation
when there are documentation comments on the structs, as `schemars` will
put them in the schema.
</content>
</entry>
<entry>
<title>Rollup merge of #144549 - folkertdev:va-arg-arm, r=saethlin</title>
<updated>2025-09-12T10:02:10+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-12T10:02:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=48d684111e462b1ff600728b9a816520a4f3276a'/>
<id>urn:sha1:48d684111e462b1ff600728b9a816520a4f3276a</id>
<content type='text'>
match clang's `va_arg` assembly on arm targets

tracking issue: https://github.com/rust-lang/rust/issues/44930

For this example

```rust
#![feature(c_variadic)]

#[unsafe(no_mangle)]
unsafe extern "C" fn variadic(a: f64, mut args: ...) -&gt; f64 {
    let b = args.arg::&lt;f64&gt;();
    let c = args.arg::&lt;f64&gt;();

    a + b + c
}
```

We currently generate (via llvm):

```asm
variadic:
    sub     sp, sp, #12
    stmib   sp, {r2, r3}
    vmov    d0, r0, r1
    add     r0, sp, #4
    vldr    d1, [sp, #4]
    add     r0, r0, #15
    bic     r0, r0, #7
    vadd.f64        d0, d0, d1
    add     r1, r0, #8
    str     r1, [sp]
    vldr    d1, [r0]
    vadd.f64        d0, d0, d1
    vmov    r0, r1, d0
    add     sp, sp, #12
    bx      lr
```

LLVM is not doing a good job. In fact, it's well-known that LLVM's implementation of `va_arg` is kind of bad, and we implement it ourselves (based on clang) for many targets already. For arm,  our own `emit_ptr_va_arg` saves 3 instructions.

Next, it turns out it's important for LLVM to explicitly start and end the lifetime of the `va_list`. In https://github.com/rust-lang/rust/pull/146059 I already end the lifetime, but when looking at this again, I noticed that it is important to also start it, see https://godbolt.org/z/EGqvKTTsK: failing to explicitly start the lifetime uses an extra register.

So, the combination of `emit_ptr_va_arg` with starting/ending the lifetime makes rustc emit exactly the instructions that clang generates::

```asm
variadic:
    sub     sp, sp, #12
    stmib   sp, {r2, r3}
    vmov    d16, r0, r1
    vldr    d17, [sp, #4]
    vadd.f64        d16, d16, d17
    vldr    d17, [sp, #12]
    vadd.f64        d16, d16, d17
    vmov    r0, r1, d16
    add     sp, sp, #12
    bx      lr
```

The arguments to `emit_ptr_va_arg` are based on [the clang implementation](https://github.com/llvm/llvm-project/blob/03dc2a41f3d9a500e47b513de5c5008c06860d65/clang/lib/CodeGen/Targets/ARM.cpp#L798-L844).

r? ``@workingjubilee`` (I can re-roll if your queue is too full, but you do seem like the right person here)

try-job: armhf-gnu
</content>
</entry>
<entry>
<title>Rollup merge of #146209 - bjorn3:lto_refactors5, r=dianqk</title>
<updated>2025-09-07T18:02:27+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-07T18:02:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=92bad93f06dc25a5370bbd85cf7e43160a03d80b'/>
<id>urn:sha1:92bad93f06dc25a5370bbd85cf7e43160a03d80b</id>
<content type='text'>
Misc LTO cleanups

Follow up to https://github.com/rust-lang/rust/pull/145955.

* Remove want_summary argument from `prepare_thin`.
   Since https://github.com/rust-lang/rust/pull/133250 ThinLTO summary writing is instead done by `llvm_optimize`.
* Two minor cleanups
</content>
</entry>
<entry>
<title>Rollup merge of #146254 - yotamofek:pr/itertools-all-equal-value, r=cjgillot</title>
<updated>2025-09-07T06:18:59+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-07T06:18:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cb8b5fa4e2a68460ffbf7a733cd2851fa13ba6a9'/>
<id>urn:sha1:cb8b5fa4e2a68460ffbf7a733cd2851fa13ba6a9</id>
<content type='text'>
Use `Itertools::all_equal_value()` where applicable

Just a small cleanup.
We already have `itertools` as a dep in these crates, so might as well use another of its features.
Makes the code simpler IMHO :)
</content>
</entry>
<entry>
<title>Move timers into execute_*_work_item</title>
<updated>2025-09-06T18:37:23+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2025-09-04T09:27:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3a1ae064a71f7e265e1e24c75b26fe3cd7edd3b1'/>
<id>urn:sha1:3a1ae064a71f7e265e1e24c75b26fe3cd7edd3b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove want_summary argument from prepare_thin</title>
<updated>2025-09-06T18:37:23+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2025-09-04T15:16:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f2933b34a8331204270fa2bdbdcfd79fcffbb302'/>
<id>urn:sha1:f2933b34a8331204270fa2bdbdcfd79fcffbb302</id>
<content type='text'>
It is always false nowadays. ThinLTO summary writing is instead done by
llvm_optimize.
</content>
</entry>
<entry>
<title>Remove thin_link_data method from ThinBufferMethods</title>
<updated>2025-09-06T18:37:23+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2025-08-15T13:12:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e3d0b7d6480d7e4dbbbea24635f56e28dfe735b3'/>
<id>urn:sha1:e3d0b7d6480d7e4dbbbea24635f56e28dfe735b3</id>
<content type='text'>
It is only used within cg_llvm.
</content>
</entry>
<entry>
<title>Ensure fat LTO doesn't merge everything into the allocator module</title>
<updated>2025-09-06T13:31:41+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2025-09-05T19:09:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2cf94b92ca852924ad90943a0c469f01742216a6'/>
<id>urn:sha1:2cf94b92ca852924ad90943a0c469f01742216a6</id>
<content type='text'>
</content>
</entry>
</feed>
