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
@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
@bors
Copy link
Collaborator

bors commented Nov 28, 2025

⌛ Testing commit f94e90f with merge 10776a4...

@bors
Copy link
Collaborator

bors commented Nov 28, 2025

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 10776a4 to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 28, 2025
@bors bors merged commit 10776a4 into rust-lang:main Nov 28, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 28, 2025
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing e6edf3a (parent) -> 10776a4 (this PR)

Test differences

Show 4 test diffs

4 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 10776a4071b7ff4056bc8ae382d4a85d4be63cdb --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-gcc: 3041.8s -> 3852.0s (+26.6%)
  2. dist-aarch64-apple: 6200.3s -> 7710.8s (+24.4%)
  3. aarch64-apple: 7363.9s -> 8835.0s (+20.0%)
  4. dist-x86_64-apple: 6037.4s -> 7231.3s (+19.8%)
  5. pr-check-1: 1664.5s -> 1932.1s (+16.1%)
  6. i686-gnu-2: 5285.0s -> 6087.5s (+15.2%)
  7. x86_64-gnu-llvm-20: 2454.7s -> 2816.7s (+14.7%)
  8. i686-gnu-1: 7322.2s -> 8291.5s (+13.2%)
  9. x86_64-gnu-llvm-20-1: 2971.6s -> 3309.5s (+11.4%)
  10. armhf-gnu: 4954.2s -> 5479.1s (+10.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (10776a4): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.6%, -0.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.6% [-0.6%, -0.6%] 1

Cycles

Results (primary 1.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.0% [2.7%, 3.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.3% [-2.1%, 3.3%] 3

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 472.955s -> 471.457s (-0.32%)
Artifact size: 386.96 MiB -> 386.89 MiB (-0.02%)

@GuillaumeGomez GuillaumeGomez deleted the subtree-update_cg_gcc_2025-11-26 branch November 28, 2025 10:15
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. merged-by-bors This PR was explicitly merged by bors. 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.