-
Notifications
You must be signed in to change notification settings - Fork 405
Rustup #4627
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
Merged
Merged
Rustup #4627
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
`DepNodeColor` tweaks A follow-up to rust-lang/rust#147293, where I attempted and mostly failed to make things faster again, but I found a few cleanups worth doing. r? `@saethlin`
add multi-arch asm! label operand test Added this since the other label operand tests are only for x86
Port the implemention of SIMD intrinsics from Miri to const-eval Ported the implementation of most SIMD intrinsics from Miri to rustc_const_eval. Remaining are - Math functions (as per `@RalfJung's` suggestions) - FMA (non-deterministic) - Funnel Shifts (not implemented in Miri yet) - Unordered reduction intrinsics (not implemented in Miri yet)
give a better example why `std` modules named like primitives are needed A small update to the `std` `lib.rs` introduction to replace mentions of `std::i32` (never needed) with `std::char` (sometimes needed). Related to rust-lang/rust#146882.
…eyouxu bootstrap: add `Builder::rustc_cmd` that includes the lib path When building with `rust.rpath = false`, every `rustc` invocation needs to include the library path as well. I particularly ran into this in `generate_target_spec_json_schema` when testing 1.91-beta in Fedora, where we do disable rpath for our system builds. The new helper function will hopefully encourage the right thing going forward.
Add diagnostic items for `pub mod consts` of FP types They will be used in Clippy.
specialize slice::fill to use memset when possible It helps const eval performance rust-lang#4616, debug builds and the gcc backend. Previously attempted in rust-lang/rust#83245 but reverted due to unsoundness rust-lang/rust#87891 around potentially-uninitialized types. This PR only handles primitives where the problem does not arise. split off from rust-lang/rust#147294
…Brouwer Fix double warnings on `#[no_mangle]` Fixes 2 out of 3 cases in rust-lang/rust#147417 The fix on closures removes the old error and marks closures as an error target. The fix on consts adds `AllowSilent` to to ignore a target, and uses the old error because that one has a nice suggestion. r? ````@jdonszelmann````
Clarify how to remediate the panic_immediate_abort error Users who build `core` for the sole purpose of enabling `panic_immediate_abort` might expect "`panic_immediate_abort` is now a real panic strategy" to mean that setting `panic = "immediate-abort"` in `Cargo.toml` or `-Cpanic=immediate-abort` in `RUSTFLAGS` to be sufficient for migration. But this is not the case, `core` still needs to be built for those changes to take effect. See rust-lang/rust#146974 for additional context. See rust-lang/rust#147286 and rust-lang/cargo#16042 for the revelant tracking issues.
Do not invalidate CFG caches in CtfeLimit. This does not matter much, as no optimization pass runs after `CtfeLimit`, but I still find the code cleaner.
format: some small cleanup Some small cleanup and some additional comments I did while trying to understand this code.
…l, r=nikic refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global` Since it can easily be implemented using the existing LLVM C API in terms of `LLVMAddGlobal` and `LLVMSetLinkage` and `define_private_global` was only used in one place. Work towards rust-lang/rust#46437
…o,oli-obk Prefer to use repeat_n over repeat().take() More from rust-lang/rust#147464, but batch processed with `ast-grep` to find and replace. second commit add notes for library: rust-lang/rust@affaf53 r? ``@RalfJung``
compiletest: Isolate public APIs and minimize public surface area As part of my ongoing efforts to improve directive parsing, I would like to be able to make internal changes without worrying about whether they're going to break the rustdoc-gui-test tool. That tool currently uses compiletest as a dependency to help with directive parsing. This PR therefore isolates all of compiletest's public APIs into two dedicated modules, one used by rustdoc-gui-test, and one used by the compiletest binary in `compiletest/src/bin/main.rs`. All other modules (and crate-root items) are then made non-`pub` to achieve the API isolation. Doing so reveals some unused items, which have been removed. (To reduce the amount of immediate textual churn, this PR does not comprehensively replace `pub` with `pub(crate)` throughout the whole crate; that could be done in a follow-up PR.) --- Ideally, rustdoc-gui-test would not depend on compiletest at all, but properly fixing that is out of scope for this PR. - rust-lang/rust#143827 r? jieyouxu
Rollup of 12 pull requests Successful merges: - rust-lang/rust#146568 (Port the implemention of SIMD intrinsics from Miri to const-eval) - rust-lang/rust#147373 (give a better example why `std` modules named like primitives are needed) - rust-lang/rust#147419 (bootstrap: add `Builder::rustc_cmd` that includes the lib path) - rust-lang/rust#147420 (Add diagnostic items for `pub mod consts` of FP types) - rust-lang/rust#147457 (specialize slice::fill to use memset when possible) - rust-lang/rust#147467 (Fix double warnings on `#[no_mangle]`) - rust-lang/rust#147470 (Clarify how to remediate the panic_immediate_abort error) - rust-lang/rust#147480 (Do not invalidate CFG caches in CtfeLimit.) - rust-lang/rust#147481 (format: some small cleanup) - rust-lang/rust#147488 (refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global`) - rust-lang/rust#147489 (Prefer to use repeat_n over repeat().take()) - rust-lang/rust#147506 (compiletest: Isolate public APIs and minimize public surface area) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 3 pull requests Successful merges: - rust-lang/rust#147446 (PassWrapper: use non-deprecated lookupTarget method) - rust-lang/rust#147473 (Do `x check` on various bootstrap tools in CI) - rust-lang/rust#147509 (remove intrinsic wrapper functions from LLVM bindings) r? `@ghost` `@rustbot` modify labels: rollup
Perform InstSimplify before ReferencePropagation. `InstSimplify` clears CFG caches. But it currently happens between `ReferencePropagation` and `GVN`, which both use dominators, a quite expensive computation. r? `@ghost`
…rget, r=davidtwco Set the minimum deployment target for `aarch64-apple-watchos` To match what's done in LLVM 21 and Xcode 26, watchOS 26 is the first OS version that actually runs true Aarch64 binaries. This affects the object files we create, and the linker invocation when using `-Clinker=ld`. See also investigation in rust-lang/rust#147223.
Move more code to `RawVec::finish_grow` This move a branch and more code into the cold method `finish_grow`, which means that less code is inlined at each `try_reserve` site. Additionally, this reduces the amount of parameters, so they can all be passed by registers.
…llot Validate CopyForDeref and DerefTemps better and remove them from runtime MIR (split from my WIP rust-lang/rust#145344) This PR: - Removes `Rvalue::CopyForDeref` and `LocalInfo::DerefTemp` from runtime MIR - Using a new mir pass `EraseDerefTemps` - `CopyForDeref(x)` is turned into `Use(Copy(x))` - `DerefTemp` is turned into `Boring` - Not sure if this part is actually necessary, it made more sense in rust-lang/rust#145344 with `DerefTemp` storing actual data that I wanted to keep from having to be kept in sync with the rest of the body in runtime MIR - Checks in validation that `CopyForDeref` and `DerefTemp` are only used together - Removes special handling for `CopyForDeref` from many places - Removes `CopyForDeref` from `custom_mir` reverting rust-lang/rust#111587 - In runtime MIR simple copies can be used instead - In post cleanup analysis MIR it was already wrong to use due to the lack of support for creating `DerefTemp` locals - Possibly this should be its own PR? - Adds an argument to `deref_finder` to avoid creating new `DerefTemp`s and `CopyForDeref` in runtime MIR. - Ideally we would just avoid making intermediate derefs instead of fixing it at the end of a pass / during shim building - Removes some usages of `deref_finder` that I found out don't actually do anything r? oli-obk
Perform unused assignment and unused variables lints on MIR. Rebase of rust-lang/rust#101500 Fixes rust-lang/rust#51003. The first commit moves detection of uninhabited types from the current liveness pass to MIR building. In order to keep the same level of diagnostics, I had to instrument MIR a little more: - keep for which original local a guard local is created; - store in the `VarBindingForm` the list of introducer places and whether this was a shorthand pattern. I am not very proud of the handling of self-assignments. The proposed scheme is in two parts: first detect probable self-assignments, by pattern matching on MIR, and second treat them specially during dataflow analysis. I welcome ideas. Please review carefully the changes in tests. There are many small changes to behaviour, and I'm not sure all of them are desirable.
…ono1, r=saethlin Fix normalization overflow ICEs in monomorphization Fixes rust-lang/rust#92004 Fixes rust-lang/rust#92470 Fixes rust-lang/rust#95134 Fixes rust-lang/rust#105275 Fixes rust-lang/rust#105937 Fixes rust-lang/rust#117696-2 Fixes rust-lang/rust#118590 Fixes rust-lang/rust#122823 Fixes rust-lang/rust#131342 Fixes rust-lang/rust#139659 ## Analysis: The causes of these issues are similar. They contain generic recursive functions that can be instantiated with different args infinitely at monomorphization stage. Ideally this should be caught by the [`check_recursion_limit`](https://github.com/rust-lang/rust/blob/c0bb3b98bb7aac24a37635e5d36d961e0b14f435/compiler/rustc_monomorphize/src/collector.rs#L468) function. The reality is that normalization can reach recursion limit earlier than monomorphization's check because they calculate depths in different ways. Since normalization is called everywhere, ICEs appear in different locations. ## Fix: If we abort on overflow with `TypingMode::PostAnalysis` in the trait solver, it would also catch these errors. The main challenge is providing good diagnostics for them. So it's quite natural to put the check right before these normalization happening. I first tried to check the whole MIR body's normalization and `references_error`. (As elaborate_drop handles normalization failure by [returning `ty::Error`](https://github.com/rust-lang/rust/blob/c0bb3b98bb7aac24a37635e5d36d961e0b14f435/compiler/rustc_mir_transform/src/elaborate_drop.rs#L514-L519).) It turns out that checking all `Local`s seems sufficient. These types are gonna be normalized anyway. So with cache, these checks shouldn't be expensive. This fixes these ICEs for both the next and old solver, though I'm not sure the change I made to the old solver is proper. Its overflow handling looks convoluted thus I didn't try to fix it more "upstream".
This updates the rust-version file to 36e4f5d1fe1d63953a5bf1758ce2b64172623e2e.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 36e4f5d1fe1d63953a5bf1758ce2b64172623e2e Filtered ref: ebb8df6 Upstream diff: rust-lang/rust@4fd3181...36e4f5d This merge was created using https://github.com/rust-lang/josh-sync.
Collaborator
|
Thank you for contributing to Miri! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: 36e4f5d1fe1d63953a5bf1758ce2b64172623e2e
Filtered ref: ebb8df6
Upstream diff: rust-lang/rust@4fd3181...36e4f5d