rust/compiler/rustc_codegen_ssa
bors 7d7de5bf3c Auto merge of #139088 - spastorino:ergonomic-ref-counting-2, r=nikomatsakis
Ergonomic ref counting: optimize away clones when possible

This PR build on top of https://github.com/rust-lang/rust/pull/134797. It optimizes codegen of ergonomic ref-counting when the type being `use`d is only known to be copy after monomorphization. We avoid codening a clone and generate bitwise copy instead.

RFC: https://github.com/rust-lang/rfcs/pull/3680
Tracking issue: https://github.com/rust-lang/rust/issues/132290
Project goal: https://github.com/rust-lang/rust-project-goals/issues/107

r? `@nikomatsakis`

This PR could better sit on top of https://github.com/rust-lang/rust/pull/131650 but as it did not land yet I've decided to just do minimal changes. It may be the case that doing what I'm doing regress the performance and we may need to go the full route of https://github.com/rust-lang/rust/pull/131650.
cc `@saethlin` in this regard.
2025-04-10 09:08:23 +00:00
..
src Auto merge of #139088 - spastorino:ergonomic-ref-counting-2, r=nikomatsakis 2025-04-10 09:08:23 +00:00
Cargo.toml bump thorin to drop duped deps 2025-03-24 19:38:16 +03:00
messages.ftl refactor: Move env parsing of deployment target to rustc_session 2025-04-04 15:02:22 +02:00
README.md

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.