Skip to content

Conversation

@GuillaumeGomez
Copy link
Member

cc @antoyo

GuillaumeGomez and others added 30 commits November 4, 2025 16:01
Improve type safety by using an enum rather than strings.
…ature

This way warnings are emitted even in a check build.
Previously it was rather inconsistent which crates got the rust logo and
which didn't and setting html_root_url was forgotten in many cases.
Replace `allow` attributes with `expect` and remove unused attributes
…ements, r=WaffleLapkin

Move warning reporting from flag_to_backend_features to cfg_target_feature

This way warnings are emitted even in a check build.
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#147994 (Deduplicate deprecation warning when using unit or tuple structs)
 - rust-lang#148440 ([rustdoc search] Simplify itemTypes and filter "dependencies")
 - rust-lang#148501 (triagebot: Create Zulip topics for libs backports)
 - rust-lang#148517 (Remove no longer necessary lint allow)
 - rust-lang#148518 (Unify the configuration of the compiler docs)
 - rust-lang#148523 (miri subtree update)
 - rust-lang#148525 (Fix ICE from lit_to_mir_constant caused by type error)
 - rust-lang#148534 (Merge `Vec::push{,_mut}_within_capacity`)

r? `@ghost`
`@rustbot` modify labels: rollup
This implements a new unstable compiler flag `-Zannotate-moves` that makes
move and copy operations visible in profilers by creating synthetic debug
information. This is achieved with zero runtime cost by manipulating debug
info scopes to make moves/copies appear as calls to `compiler_move<T, SIZE>`
and `compiler_copy<T, SIZE>` marker functions in profiling tools.

This allows developers to identify expensive move/copy operations in their
code using standard profiling tools, without requiring specialized tooling
or runtime instrumentation.

The implementation works at codegen time. When processing MIR operands
(`Operand::Move` and `Operand::Copy`), the codegen creates an `OperandRef`
with an optional `move_annotation` field containing an `Instance` of the
appropriate profiling marker function. When storing the operand,
`store_with_annotation()` wraps the store operation in a synthetic debug
scope that makes it appear inlined from the marker.

Two marker functions (`compiler_move` and `compiler_copy`) are defined
in `library/core/src/profiling.rs`. These are never actually called -
they exist solely as debug info anchors.

Operations are only annotated if the type:
   - Meets the size threshold (default: 65 bytes, configurable via
     `-Zannotate-moves=SIZE`)
   - Has a non-scalar backend representation (scalars use registers,
     not memcpy)

This has a very small size impact on object file size. With the default
limit it's well under 0.1%, and even with a very small limit of 8 bytes
it's still ~1.5%. This could be enabled by default.
…_2025-11-04, r=GuillaumeGomez

Sync rustc_codegen_gcc subtree

cc `@antoyo`

r? ghost
 Clarify -Cllvm-args forwarding to GCC in Readme
Dlopen libgccjit.so in order to support multiple targets more easily
@GuillaumeGomez
Copy link
Member Author

r? ghost

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the subtree-update_cg_gcc_2025-11-26 branch from fa92185 to 6df9df9 Compare November 26, 2025 14:27
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

antoyo and others added 4 commits November 26, 2025 12:52
This will be useful for the unification work of the handling of the
library between all Rust setups.
@GuillaumeGomez GuillaumeGomez force-pushed the subtree-update_cg_gcc_2025-11-26 branch from 6df9df9 to 9776f45 Compare November 26, 2025 18:44
@rustbot

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Nov 26, 2025

⚠️ Warning ⚠️

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2025

This PR changes how GCC is built. Consider updating src/bootstrap/download-ci-gcc-stamp.

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Nov 27, 2025
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=1 rollup=never

@bors
Copy link
Collaborator

bors commented Nov 27, 2025

📌 Commit f94e90f has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-merge-commits PR has merge commits, merge with caution. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants