-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Subtree sync for rustc_codegen_cranelift #142959
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
Conversation
And move passing it to the linker to the driver code.
This deduplicates some code between codegen backends and may in the future allow adding extra metadata that is only known at link time.
- remove unused `llvm.aarch64.neon.frintn` from cg_clif
…bzol Merge `compiler-builtins` as a Josh subtree Use the Josh [1] utility to add `compiler-builtins` as a subtree, which will allow us to stop using crates.io for updates. This is intended to help resolve some problems when unstable features change and require code changes in `compiler-builtins`, which sometimes gets trapped in a bootstrap cycle. This was done using `josh-filter` built from the r24.10.04 tag: git fetch https://github.com/rust-lang/compiler-builtins.git 233434412fe7eced8f1ddbfeddabef1d55e493bd josh-filter ":prefix=library/compiler-builtins" FETCH_HEAD git merge --allow-unrelated FILTERED_HEAD The HEAD in the `compiler-builtins` repository is 233434412f ("fix an if statement that can be collapsed"). [1]: https://github.com/josh-project/josh
…=bjorn3 Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi` Our `conv_from_spec_abi`, `adjust_abi`, and `is_abi_supported` combine to give us a very confusing way of reasoning about what _actual_ calling convention we want to lower our code to and whether we want to compile the resulting code at all. Instead of leaving this code as a miniature adventure game in which someone tries to combine stateful mutations into a Rube Goldberg machine that will let them escape the maze and arrive at the promised land of codegen, we let `AbiMap` devour this complexity. Once you have an `AbiMap`, you can answer which `ExternAbi`s will lower to what `CanonAbi`s (and whether they will lower at all). Removed: - `conv_from_spec_abi` replaced by `AbiMap::canonize_abi` - `adjust_abi` replaced by same - `Conv::PreserveAll` as unused - `Conv::Cold` as unused - `enum Conv` replaced by `enum CanonAbi` target-spec.json changes: - If you have a target-spec.json then now your "entry-abi" key will be specified in terms of one of the `"{abi}"` strings Rust recognizes, e.g. ```json "entry-abi": "C", "entry-abi": "win64", "entry-abi": "aapcs", ```
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#137725 (Add `iter` macro) - rust-lang#141455 (std: abort the process on failure to allocate a TLS key) - rust-lang#141569 (Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi`) - rust-lang#141698 (Use the informative error as the main const eval error message) - rust-lang#141925 (Remove bootstrap cfgs from library/) - rust-lang#141943 (Remove pre-expansion AST stats.) - rust-lang#141945 (Remove `Path::is_ident`.) - rust-lang#141957 (Add missing `dyn` keywords to tests that do not test for them Part 2) r? `@ghost` `@rustbot` modify labels: rollup
It was already available as a generic parameter anyway, and it's not like we'll ever put a tag in the 5-billionth field.
As suggested by Ralf in 142005.
…-obk Update `InterpCx::project_field` to take `FieldIdx` As suggested by Ralf in rust-lang#142005 (comment)
Update stdarch submodule Updates the stdarch submodule. ## Merged PRs - rust-lang/stdarch#1797 - rust-lang/stdarch#1758 - rust-lang/stdarch#1798 - rust-lang/stdarch#1811 - rust-lang/stdarch#1810 - rust-lang/stdarch#1807 - rust-lang/stdarch#1806 - rust-lang/stdarch#1812 - rust-lang/stdarch#1795 - rust-lang/stdarch#1796 - rust-lang/stdarch#1813 - rust-lang/stdarch#1816 - rust-lang/stdarch#1818 - rust-lang/stdarch#1820 - rust-lang/stdarch#1819 r? `@Amanieu` `@rustbot` label T-libs-api Closes rust-lang#111137
In PR 90877 T-lang decided not to remove `intrinsics::pref_align_of`. However, the intrinsic and its supporting code 1. is a nightly feature, so can be removed at compiler/libs discretion 2. requires considerable effort in the compiler to support, as it necessarily complicates every single site reasoning about alignment 3. has been justified based on relevance to codegen, but it is only a requirement for C++ (not C, not Rust) stack frame layout for AIX, in ways Rust would not consider even with increased C++ interop 4. is only used by rustc to overalign some globals, not correctness 5. can be adequately replaced by other rules for globals, as it mostly affects alignments for a few types under 16 bytes of alignment 6. has only one clear benefactor: automating C -> Rust translation for GNU extensions like `__alignof` 7. such code was likely intended to be `alignof` or `_Alignof`, because the GNU extension is a "false friend" of the C keyword, which makes the choice to support such a mapping very questionable 8. makes it easy to do incorrect codegen in the compiler by its mere presence as usual Rust rules of alignment (e.g. `size == align * N`) do not hold with preferred alignment The implementation is clearly damaging the code quality of the compiler. Thus it is within the compiler team's purview to simply rip it out. If T-lang wishes to have this intrinsic restored for c2rust's benefit, it would have to use a radically different implementation that somehow does not cause internal incorrectness. Until then, remove the intrinsic and its supporting code, as one tool and an ill-considered GCC extension cannot justify risking correctness. Because we touch a fair amount of the compiler to change this at all, and unfortunately the duplication of AbiAndPrefAlign is deep-rooted, we keep an "AbiAlign" type which we can wean code off later.
Also reduce visibility of a function
|
There are changes to the cc @jieyouxu The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. |
@bors r+ p=1 subtree sync |
…bjorn3 Subtree sync for rustc_codegen_cranelift The main highlight this time is a Cranelift update. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
☀️ Test successful - checks-actions |
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 3129d37 (parent) -> 28f1c80 (this PR) Test differencesNo test diffs found Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 28f1c807911c63f08d98e7b468cfcf15a441e34b --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (28f1c80): comparison URL. Overall result: ❌ regressions - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 1.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 689.011s -> 689.458s (0.06%) |
This PR didn't change the benchmarked compiler, and @rustbot label: +perf-regression-triaged |
The main highlight this time is a Cranelift update.
r? @ghost
@rustbot label +A-codegen +A-cranelift +T-compiler