<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/mir-opt, branch auto</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=auto</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=auto'/>
<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>Auto merge of #147231 - CrooseGit:dev/reucru01/extend_rustc_force_inline, r=saethlin</title>
<updated>2025-10-02T21:43:10+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-10-02T21:43:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8d603ef2879fd263f8e9aea340b4c035ed7973db'/>
<id>urn:sha1:8d603ef2879fd263f8e9aea340b4c035ed7973db</id>
<content type='text'>
Extending `#[rustc_force_inline]` to be applicable to inherent methods

`#[rustc_force_inline]` is an internal-only attribute similar to `#[inline(always)]` but which emits an error if inlining cannot occur. rustc_force_inline uses the MIR inliner to do this and has limitations on where it can be applied to ensure that an error is always emitted if inlining can't happen (e.g. it can't be applied to trait methods because calls to those can't always be resolved).

`#[rustc_force_inline]` is motivated by AArch64 pointer authentication intrinsics where it is vital for the security properties of these intrinsics that they do not exist in standalone functions that could be used as gadgets in an exploit (if they could, then you could sign whatever pointers you want, for example, which is bad, but if you force inlining, then you can't jump to a reusable function containing only these instructions).

Since its initial implementation, `#[rustc_force_inline]` could only be applied to free functions. This can be relaxed to also allow inherent methods while still preserving the desired properties. In a work-in-progress patch for manual pointer authentication intrinsics, it is useful to introduce types with inherent methods that would need to be force inlined.

r? `@saethlin`
</content>
</entry>
<entry>
<title>Extends `rustc_force_inline` to inherent methods</title>
<updated>2025-10-02T10:30:11+00:00</updated>
<author>
<name>Reuben Cruise</name>
<email>reuben.cruise@arm.com</email>
</author>
<published>2025-09-25T15:11:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5bf5e7116099d85a99d047cfa43db155074e594a'/>
<id>urn:sha1:5bf5e7116099d85a99d047cfa43db155074e594a</id>
<content type='text'>
- Changes parser to allow application to inherent methods.
- Adds tests to confirm extended functionality works just as the existing.
</content>
</entry>
<entry>
<title>mir-opt: Eliminate dead statements even if they are used by debuginfos</title>
<updated>2025-10-02T06:58:59+00:00</updated>
<author>
<name>dianqk</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2025-07-19T10:49:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8da04285cf6fe61587e16155a8b224dba64bf0be'/>
<id>urn:sha1:8da04285cf6fe61587e16155a8b224dba64bf0be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mir-opt: Eliminate trivial unnecessary storage annotations</title>
<updated>2025-10-02T06:55:51+00:00</updated>
<author>
<name>dianqk</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2025-07-15T14:54:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=85b2f706939528b5796d98e82c183637f8338cd1'/>
<id>urn:sha1:85b2f706939528b5796d98e82c183637f8338cd1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>simplifycfg: Preserve debuginfos when merging bbs</title>
<updated>2025-10-02T06:55:50+00:00</updated>
<author>
<name>dianqk</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2025-07-10T13:20:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cc93132ae4f5477297ecddb0c07d2e8c74075f0c'/>
<id>urn:sha1:cc93132ae4f5477297ecddb0c07d2e8c74075f0c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mir-opt: Eliminate dead ref statements</title>
<updated>2025-10-02T06:55:50+00:00</updated>
<author>
<name>dianqk</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2025-06-08T07:30:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=571412f8190089c36758031fe09fc0ece59be6b7'/>
<id>urn:sha1:571412f8190089c36758031fe09fc0ece59be6b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Split Bound into Canonical and Bound</title>
<updated>2025-09-30T16:58:28+00:00</updated>
<author>
<name>jackh726</name>
<email>git@jackhuey.me</email>
</author>
<published>2025-09-28T23:04:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d1bbd39c59523d7a5499816a9da200a5910f8b7f'/>
<id>urn:sha1:d1bbd39c59523d7a5499816a9da200a5910f8b7f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #142915 - cjgillot:dest-prop-default, r=saethlin</title>
<updated>2025-09-17T10:44:22+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-09-17T10:44:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ce6daf3d5a5bffb2a00264197f92dc31608df0da'/>
<id>urn:sha1:ce6daf3d5a5bffb2a00264197f92dc31608df0da</id>
<content type='text'>
Enable DestinationPropagation by default

This PR proposes to perform destination propagation on MIR. Most of the pass was fully rewritten by `@JakobDegen` in rust-lang/rust#96451.

This pass is quite heavy, as it needs to perform and save the results of a full liveness dataflow analysis. This accounts for ~50% of the pass' runtime.

Perf sees a few decent savings in later llvm passes, but also sizeable régressions when there are no savings to balance this pass' runtime.
</content>
</entry>
<entry>
<title>Rollup merge of #146564 - cjgillot:mir-nolen, r=scottmcm</title>
<updated>2025-09-17T04:56:48+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-09-17T04:56:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6473a0f02d6549dc25d8f98b3d06f80fa453fe49'/>
<id>urn:sha1:6473a0f02d6549dc25d8f98b3d06f80fa453fe49</id>
<content type='text'>
Remove Rvalue::Len again.

Now that we have `RawPtrKind::FakeForPtrMetadata`, we can reimplement `Rvalue::Len` using `PtrMetadata(&amp;raw const (fake) place)`.

r? ``@scottmcm``
</content>
</entry>
</feed>
