-
Notifications
You must be signed in to change notification settings - Fork 14k
cg_gcc subtree sync #149348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
cg_gcc subtree sync #149348
Conversation
…update_cg_gcc_2025-11-04
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
…1_13 Sync from rust 2025/11/13
Clarify -Cllvm-args forwarding to GCC in Readme
…1_24 Update to nightly-2025-11-24
Dlopen libgccjit.so in order to support multiple targets more easily
|
r? ghost |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Update gccjit dependency
fa92185 to
6df9df9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This will be useful for the unification work of the handling of the library between all Rust setups.
…root Move libgccjit.so in the sysroot
…update_cg_gcc_2025-11-26
6df9df9 to
9776f45
Compare
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
This PR changes how GCC is built. Consider updating src/bootstrap/download-ci-gcc-stamp. |
|
@bors r+ p=1 rollup=never |
cc @antoyo