<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/debuginfo, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<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>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>Replace `MetadataType` with the `MetadataKindId` constants</title>
<updated>2025-09-30T10:10:30+00:00</updated>
<author>
<name>Zalathar</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-30T10:05:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cc6329a9bcd78c4531e9713775e2936fe223e601'/>
<id>urn:sha1:cc6329a9bcd78c4531e9713775e2936fe223e601</id>
<content type='text'>
</content>
</entry>
<entry>
<title>remove explicit deref of AbiAlign for most methods</title>
<updated>2025-09-28T22:02:14+00:00</updated>
<author>
<name>Jubilee Young</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2025-09-28T21:40:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0c9d0dfe046f0674f0507df564504ac3bac862d9'/>
<id>urn:sha1:0c9d0dfe046f0674f0507df564504ac3bac862d9</id>
<content type='text'>
Much of the compiler calls functions on Align projected from AbiAlign.
AbiAlign impls Deref to its inner Align, so we can simplify these away.
Also, it will minimize disruption when AbiAlign is removed.

For now, preserve usages that might resolve to PartialOrd or PartialEq,
as those have odd inference.
</content>
</entry>
<entry>
<title>Rollup merge of #146763 - Zalathar:di-builder, r=jdonszelmann</title>
<updated>2025-09-28T07:15:23+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-28T07:15:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e8578c88085b0554c1b3b6252f1d870015f39d25'/>
<id>urn:sha1:e8578c88085b0554c1b3b6252f1d870015f39d25</id>
<content type='text'>
cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 5)

- Part of rust-lang/rust#134001
- Follow-up to rust-lang/rust#146673

---

This is another batch of LLVMDIBuilder binding migrations, replacing some our own LLVMRust bindings with bindings to upstream LLVM-C APIs.

Some of these are a little more complex than most of the previous migrations, because they split one LLVMRust binding into multiple LLVM bindings, but nothing too fancy.

This appears to be the last of the low-hanging fruit. As noted in https://github.com/rust-lang/rust/issues/134001#issuecomment-2524979268, the remaining bindings are difficult or impossible to migrate at present.
</content>
</entry>
<entry>
<title>Rollup merge of #146704 - jdonszelmann:port-debug-visualizer, r=petrochenkov</title>
<updated>2025-09-26T16:11:09+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-09-26T16:11:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d09bb02eb50c5b7137eb9a14f546540fa24083cf'/>
<id>urn:sha1:d09bb02eb50c5b7137eb9a14f546540fa24083cf</id>
<content type='text'>
port `#[debugger_visualizer]` to the new attribute system
</content>
</entry>
<entry>
<title>Rollup merge of #146667 - calebzulawski:simd-mono-lane-limit, r=lcnr,RalfJung</title>
<updated>2025-09-25T10:31:53+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-25T10:31:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fab06469ee33664739620ede53ed18b8c3c40644'/>
<id>urn:sha1:fab06469ee33664739620ede53ed18b8c3c40644</id>
<content type='text'>
Add an attribute to check the number of lanes in a SIMD vector after monomorphization

Allows std::simd to drop the `LaneCount&lt;N&gt;: SupportedLaneCount` trait and maintain good error messages.

Also, extends rust-lang/rust#145967 by including spans in layout errors for all ADTs.

r? ``@RalfJung``

cc ``@workingjubilee`` ``@programmerjake``
</content>
</entry>
<entry>
<title>Including spans in layout errors for all ADTs</title>
<updated>2025-09-24T02:15:06+00:00</updated>
<author>
<name>Caleb Zulawski</name>
<email>caleb.zulawski@gmail.com</email>
</author>
<published>2025-09-24T02:14:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=60548ffaa3dafec019e52f39ab7a075d3f11e24e'/>
<id>urn:sha1:60548ffaa3dafec019e52f39ab7a075d3f11e24e</id>
<content type='text'>
</content>
</entry>
</feed>
