#V2EX
### [Rust] Contributions to Rust and LLVM in 2025
文末广告 :)
2025
* Rust: Merged [28 PRs](

GitHub
Pull requests · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Pull requests · rust-lang/rust
reviewed [24 PRs](

GitHub
Pull requests · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Pull requests · rust-lang/rust
* LLVM: Merged [13 PRs](

GitHub
Pull requests · llvm/llvm-project
The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. - Pull requests · llvm/llvm-project
2024
* Rust: Merged [40 PRs](

GitHub
Pull requests · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Pull requests · rust-lang/rust
* LLVM: Merged [20 PRs](

GitHub
Pull requests · llvm/llvm-project
The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. - Pull requests · llvm/llvm-project
I have much less spare time this year because I have a baby :p. And I'm looking for a sustainable way to contribute.
I joined the Rust compiler team (in 2024! :3).
## LLVM: A performance regression in LLVM that affected Ajla and Python
This regression has been discussed elsewhere; see [lobste.rs/s/9paxz2/performance\_python\_3\_14\_tail\_call](
https://lobste.rs/s/9paxz2/performance_python_3_14_tail_call).
I introduced the regression due to a limit for compile time in [llvm#78582](

GitHub
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
Finally, I learned [a resolve](

GitHub
gcc/gcc/bb-reorder.cc at 7f67acf60c5429895d7c9e5df81796753e2913e0 · gcc-mirror/gcc
Contribute to gcc-mirror/gcc development by creating an account on GitHub.
from GCC, and then I fixed the regression in [llvm#114990](
https://github.com/llvm/llvm-project/pull/114990) and [llvm#132536](

GitHub
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
## Rust: Transforming “Clone” to “Copy”
To me, the most interesting issue is [rust#128081](

GitHub
Issues · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Issues · rust-lang/rust
The "Clone" method can be transformed to "Copy" in GVN. I have several PRs for this and am working on more.
The first key PR ([rust#128299](
https://github.com/rust-lang/rust/pull/128299)) exposed variant miscompilations. Camille Gillot identified the root cause in [rust#147844](

GitHub
GVN: Bail out if the address cannot be dereferenced. by dianqk · Pull Request #147844 · rust-lang/rust
Fixes #141313 and #141313 (comment).
We should always use VnIndex when dereferencing an address in GVN.
r? cjgillot
r? tmiasko (since you found that)
> We can reason with the value behind a reference because it is UB to directly assign to the underlying local while the reference is live. We allow creating new derefs, this means *extending the liveness of references*, so we are creating UB.
## Rust: Debuginfo in MIR Basic Blocks
[rust#129931](
https://github.com/rust-lang/rust/pull/129931) turns out that handling Debuginfo in MIR Basic Blocks is required. I implemented this in [rust#142771](

GitHub
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
This left some stuff:
* Better remapping locals for debuginfos; see [rust#147525](

GitHub
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
* A tracking issue: [Figure out all debugging information representations of statements #147679](

GitHub
Issues · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Issues · rust-lang/rust
* Add documentation for the change in the [Rust Compiler Development Guide](
https://rustc-dev-guide.rust-lang.org/).
## Rust: 4 P-critical
I caused 4 P-critical issues. :(
* [Miscompilation due to MatchBranchSimplification MIR pass mixing up discriminants #124150](

GitHub
Issues · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Issues · rust-lang/rust
* [Panic while compiling http-body v0.4.6 with rustc 1.83.0-nightly (7042c269c 2024-09-23) #130769](

GitHub
Issues · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Issues · rust-lang/rust
* [Panic in nightly 1.83.0 and 1.84.0 with opt-level >= 1 when unwrapping Some variant #132353](

GitHub
Issues · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Issues · rust-lang/rust
* [staticlib with lto=fat now includes compiler\_builtins as llvm bitcode after rustup update #146145](

GitHub
Issues · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Issues · rust-lang/rust
The [rust#124150](

GitHub
Issues · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Issues · rust-lang/rust
and [rust#132353](

GitHub
Issues · rust-lang/rust
Empowering everyone to build reliable and efficient software. - Issues · rust-lang/rust
are miscompilations in MIR opt. I'm investigating some translation validation tools, such as Miri, Alive2, and model checker, but I haven't made any progress. So far, I have only read Program Z3, and I have forgotten many things. Furthermore, I'm thinking about picking it up next year. :p
## Other
While reviewing PRs can be exhausting, it's also a great learning opportunity. For instance, working through PRs like [rust#142707](
https://github.com/rust-lang/rust/pull/142707), [rust#143784](
https://github.com/rust-lang/rust/pull/143784), [rust#136840](
https://github.com/rust-lang/rust/pull/136840), and [rust#133832](
https://github.com/rust-lang/rust/pull/133832) taught me a great deal.
I realize that the knowledge of the LLVM backend is essential to me, since more and more issues happened in the LLVM backend. I'm not sure how to tackle these issues, but I have begun studying *[LLVM Code Generation: A deep dive into compiler backend development](
https://www.packtpub.com/en-us/product/llvm-code-generation-9781835462577)*.
MIR optimizations are still important to me. I'd like to thank [Camille Gillot](
https://github.com/cjgillot) for their help on MIR.
I'm trying to immerse myself in English, and I have stopped using LLM for Chinese-to-English translation anymore. :p
I'm also learning Japanese for fun. If you are interested in anime and manga, I recommend you read [learnjapanese.moe](
https://learnjapanese.moe).
---
家里没地方了 :(,卖掉我的 7950X 主机:
* CPU:AMD 7950X
* 主板:华硕 TUF GAMING B650M-PLUS
* 内存 2 条:金士顿 FURY 32G D5 6000
* 水冷:华硕 ROG STRIX 飞龙二代 360
* 硬盘:ZHITAI TiPlus7100 2TB
* 硬盘:Samsung SSD 980 PRO 2TB
* 显卡:AMD 撼讯 RX6600
* 电源:先马 XP850W 白金
* 机箱:乔思伯 松果 D31
价格 11000 。
V2EX
Contributions to Rust and LLVM in 2025 - V2EX
Rust - @dianqk - 文末广告 :)2025- Rust: Merged [28 PRs]( https://github.com/rust-lang/rust/pulls?q=is%3Apr%20auth