<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-10-03T11:49:42+00:00</updated>
<entry>
<title>Auto merge of #142771 - dianqk:mir-stmt-debuginfo, r=cjgillot</title>
<updated>2025-10-03T11:49:42+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-10-03T11:49:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8b6b15b877fbceb1ee5d9a5a4746e7515901574a'/>
<id>urn:sha1:8b6b15b877fbceb1ee5d9a5a4746e7515901574a</id>
<content type='text'>
Introduce debuginfo to statements in MIR

The PR introduces support for debug information within dead statements. Currently, only the reference statement is supported, which is sufficient to fix rust-lang/rust#128081.

I don't modify Stable MIR, as I don't think we need debug information when using it.

This PR represents the debug information for the dead reference statement via `#dbg_value`. For example, `let _foo_b = &amp;foo.b` becomes `#dbg_value(ptr %foo, !22, !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value), !26)`. You can see this here: https://rust.godbolt.org/z/d43js6adv.

The general principle for handling debug information is to never provide less debug information than the optimized LLVM IR.

The current rules for dropping debug information in this PR are:

- If the LLVM IR cannot represent a reference address, it's replaced with poison or simply dropped. For example, see: https://rust.godbolt.org/z/shGqPec8W. I'm using poison in all such cases now.
- All debuginfos is dropped when merging multiple successor BBs. An example is available here: https://rust.godbolt.org/z/TE1q3Wq6M.

I doesn't drop debuginfos in `MatchBranchSimplification`, because LLVM also pick one branch for it.
</content>
</entry>
<entry>
<title>Extract helper method `global_set_metadata_node`</title>
<updated>2025-10-02T08:06:58+00:00</updated>
<author>
<name>Zalathar</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-10-02T07:33:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8ef9821bf2e27bf7ab4f9a0e3d0975dc59d3d932'/>
<id>urn:sha1:8ef9821bf2e27bf7ab4f9a0e3d0975dc59d3d932</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Extract helper method `global_add_metadata_node`</title>
<updated>2025-10-02T08:06:57+00:00</updated>
<author>
<name>Zalathar</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-10-02T07:19:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6a58f80a3c4cf53f8092e75c07cebd5e913cccf0'/>
<id>urn:sha1:6a58f80a3c4cf53f8092e75c07cebd5e913cccf0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Extract helper method `module_add_named_metadata_node`</title>
<updated>2025-10-02T08:04:24+00:00</updated>
<author>
<name>Zalathar</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-10-02T06:39:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ffeed2b94ed432c959e3d9cf9bd5f7016f9577d3'/>
<id>urn:sha1:ffeed2b94ed432c959e3d9cf9bd5f7016f9577d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Extract helper method `set_metadata_node`</title>
<updated>2025-10-02T08:04:23+00:00</updated>
<author>
<name>Zalathar</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-10-02T06:29:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ecb831dcf4c28d3b66c9bce7aa4c3a8eb221fa5e'/>
<id>urn:sha1:ecb831dcf4c28d3b66c9bce7aa4c3a8eb221fa5e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>codegen: Generate `dbg_value` for the ref statement</title>
<updated>2025-10-02T06:55:51+00:00</updated>
<author>
<name>dianqk</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2025-06-18T14:04:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1bd89bd42e0bb6f29b8af5d6bdf3f756196bb8ee'/>
<id>urn:sha1:1bd89bd42e0bb6f29b8af5d6bdf3f756196bb8ee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #147200 - ZuseZ4:fix-autodiff-emptry-ret, r=Zalathar</title>
<updated>2025-10-01T12:15:01+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-10-01T12:15:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7b0236fbd8ce4f4f433f66a4289b4c3b94f24ea2'/>
<id>urn:sha1:7b0236fbd8ce4f4f433f66a4289b4c3b94f24ea2</id>
<content type='text'>
Fix autodiff empty ret regression

closes https://github.com/rust-lang/rust/issues/147144

The two gsoc summer projects caused a bit of churn, which was to be expected, especially since we don't run autodiff in CI yet.
This adds a void return testcase that we should have had anyway, and fixes the regression.

r? `@Zalathar` (Just guessing since I've seen you in a few LLVM PRs and Oli is probably still busy. Feel free to reroll!)
</content>
</entry>
<entry>
<title>Auto merge of #147198 - matthiaskrgr:rollup-b0ryvvu, r=matthiaskrgr</title>
<updated>2025-10-01T04:46:14+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-10-01T04:46:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1e1a39441bd11aba541a48ba714d939490fc7b85'/>
<id>urn:sha1:1e1a39441bd11aba541a48ba714d939490fc7b85</id>
<content type='text'>
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#143069 (Add fast-path for accessing the current thread id)
 - rust-lang/rust#146518 (Improve the documentation around `ZERO_AR_DATE`)
 - rust-lang/rust#146596 (Add a dummy codegen backend)
 - rust-lang/rust#146617 (Don’t suggest foreign `doc(hidden)` types in "the following other types implement trait" diagnostics)
 - rust-lang/rust#146635 (cg_llvm: Stop using `as_c_char_ptr` for coverage-related bindings)
 - rust-lang/rust#147184 (Fix the bevy implied bounds hack for the next solver)

r? `@ghost`
`@rustbot` modify labels: rollup
</content>
</entry>
<entry>
<title>fix void and empty struct ret</title>
<updated>2025-10-01T02:47:40+00:00</updated>
<author>
<name>Manuel Drehwald</name>
<email>git@manuel.drehwald.info</email>
</author>
<published>2025-09-30T21:56:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ddbaca521edf274b1462fced5b50ee6983fb8d01'/>
<id>urn:sha1:ddbaca521edf274b1462fced5b50ee6983fb8d01</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #146635 - Zalathar:llvm-cov, r=SparrowLii</title>
<updated>2025-09-30T19:53:35+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-30T19:53:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b21c438eb506d803354af91ca1fc34e47713d799'/>
<id>urn:sha1:b21c438eb506d803354af91ca1fc34e47713d799</id>
<content type='text'>
cg_llvm: Stop using `as_c_char_ptr` for coverage-related bindings

[As explained by a note in `ffi.rs`](https://github.com/rust-lang/rust/blob/8a1b39995e5b630c5872f5de5079f1f569bd5ac2/compiler/rustc_codegen_llvm/src/llvm/ffi.rs#L4-L11), passing strings and byte slices through FFI is more convenient if we take advantage of the fact that `*const c_uchar` and `*const c_char` have the same ABI.

Doing so avoids having to rely on a special helper function, since we can just call `as_ptr` instead.

(The same logic applies to every other binding that currently uses the `as_c_char_ptr` helper; I just haven't adjusted all of them yet.)

---

As a drive-by change, this PR also marks some coverage-related FFI bindings as `safe`.
</content>
</entry>
</feed>
