-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
sync GCC backend 2025-12-21 #150215
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
Open
GuillaumeGomez
wants to merge
35
commits into
rust-lang:main
Choose a base branch
from
GuillaumeGomez:subtree-update_cg_gcc_2025-12-21
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
sync GCC backend 2025-12-21 #150215
GuillaumeGomez
wants to merge
35
commits into
rust-lang:main
from
GuillaumeGomez:subtree-update_cg_gcc_2025-12-21
+118
−31
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This works better with non-LLVM codegen backends.
…update_cg_gcc_2025-11-26
…_2025-11-26, r=GuillaumeGomez cg_gcc subtree sync cc `@antoyo`
There are major questions remaining about the reentrancy that this allows. It doesn't have any users on github outside of a single project that uses it in a panic=abort project to show backtraces. It can still be emulated through #[alloc_error_handler] or set_alloc_error_hook depending on if you use the standard library or not. And finally it makes it harder to do various improvements to the allocator shim.
This register is only supported on the *powerpc*spe targets. It is only recognized by LLVM. gcc does not accept this as a clobber, nor does it support these targets. This is a volatile register, thus it is included with clobber_abi.
…update_cg_gcc_2025-12-04
Regenerate intrinsics
…_2025-12-04, r=GuillaumeGomez cg_gcc subtree update cc `@antoyo` r? ghost
Since GCC is not multi-target, we need multiple libgccjit.so. Our solution to have a directory per target so that we can have multiple libgccjit.so.
Remove `[no-mentions]` handler in our triagebot config
Remove -Zoom=panic There are major questions remaining about the reentrancy that this allows. It doesn't have any users on github outside of a single project that uses it in a panic=abort project to show backtraces. It can still be emulated through `#[alloc_error_handler]` or `set_alloc_error_hook` depending on if you use the standard library or not. And finally it makes it harder to do various improvements to the allocator shim. With this PR the sole remaining symbol in the allocator shim that is not effectively emulating weak symbols is the symbol that prevents skipping the allocator shim on stable even when it would otherwise be empty because libstd + `#[global_allocator]` is used. Closes rust-lang#43596 Fixes rust-lang#126683
…bzol Run clippy on cg_gcc in CI This is to prevent [this issue](rust-lang#149449 (comment)): in cg_gcc repository, we run clippy on our code but not in here, which can create issues. cc ````@antoyo```` r? ````@Kobzol````
…let ... else return`
…toyo Update `rustc_codegen_gcc` rotate operation document ## Description This PR resolves a TODO comment in the `rustc_codegen_gcc` backend by documenting that the rotate operations (`rotate_left` and `rotate_right`) already implement the optimized branchless algorithm from comment. The existing implementation already uses the optimal branchless rotation pattern: - For left rotation: `(x << n) | (x >> (-n & (width-1)))` - For right rotation: `(x >> n) | (x << (-n & (width-1)))` This pattern avoids branches and generates efficient machine code across different platforms, which was the goal mentioned in the original TODO. ## Changes - Removed the TODO comment that suggested implementing the algorithm from https://blog.regehr.org/archives/1063
Use `let...else` instead of `match foo { ... _ => return };` and `if let ... else return`
Overhaul filename handling for cross-compiler consistency This PR overhauls the way we handle filenames in the compiler and `rmeta` in order to achieve achieve cross-compiler consistency (ie. having the same path no matter if the filename was created in the current compiler session or is coming from `rmeta`). This is required as some parts of the compiler rely on consistent paths for the soundness of generated code (see rust-lang#148328). In order to achieved consistency multiple steps are being taken by this PR: - by making `RealFileName` immutable - by only having `SourceMap::to_real_filename` create `RealFileName` - currently `RealFileName` can be created from any `Path` and are remapped afterwards, which creates consistency issue - by also making `RealFileName` holds it's working directory, embeddable name and the remapped scopes - this removes the need for a `Session`, to know the current(!) scopes and cwd, which is invalid as they may not be equal to the scopes used when creating the filename In order for `SourceMap::to_real_filename` to know which scopes to apply `FilePathMapping` now takes the current remapping scopes to apply, which makes `FileNameDisplayPreference` and company useless and are removed. This PR is split-up in multiple commits (unfortunately not atomic), but should help review the changes. Unblocks rust-lang#147611 Fixes rust-lang#148328
Introduces `BackendRepr::ScalableVector` corresponding to scalable vector types annotated with `repr(scalable)` which lowers to a scalable vector type in LLVM. Co-authored-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com>
…2_20 Sync from rust 2025/12/20
Collaborator
|
Some changes occurred in compiler/rustc_codegen_gcc |
Collaborator
|
antoyo
approved these changes
Dec 20, 2025
Contributor
|
@bors r+ rollup=never p=1 |
Collaborator
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-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? ghost