-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 6 pull requests #105531
Rollup of 6 pull requests #105531
Conversation
Ensure that heap allocation does not occur in a thread until std::thread is ready. This fixes issues with custom allocators that call std::thread::current(), since doing so prematurely initializes THREAD_INFO and causes the following thread_info::set() to fail.
This will allow us to separate the act of calculating the offsets from creating LLVM IR that performs the actions.
In order for LLVM to correctly generate debuginfo for msvc, we sometimes need to spill arguments to the stack and perform some direct & indirect offsets into the value. Previously, this code always performed those actions, even when not required as LLVM would clean it up during optimization. However, when MIR inlining is enabled, this can cause problems as the operations occur prior to the spilled value being initialized. To solve this, we first calculate the necessary offsets using just the type which is side-effect free and does not alter the LLVM IR. Then, if we are in a situation which requires us to generate the LLVM IR (and this situation only occurs for arguments, not local variables) then we perform the same calculation again, this time generating the appropriate LLVM IR as we go.
This migrates everything but the `mbe` and `proc_macro` modules. It also contains a few cleanups and drive-by/accidental diagnostic improvements which can be seen in the diff for the UI tests.
…r=davidtwco Migrate parts of `rustc_expand` to session diagnostics This migrates everything but the `mbe` and `proc_macro` modules. It also contains a few cleanups and drive-by/accidental diagnostic improvements which can be seen in the diff for the UI tests.
…fee1-dead Point at LHS on binop type err if relevant
Remove unneeded field from `SwitchTargets` This had a fixme already. The only change in behavior is that the mir dumps now no longer contains labels for the types of the integers on the edges of a switchint: Before: ![image](https://user-images.githubusercontent.com/51179609/205467622-34401a68-dca6-43eb-915e-b9fda1988860.png) After: ![image](https://user-images.githubusercontent.com/51179609/205467634-b5b2a259-9cb4-4843-845c-592c500f0f9c.png) I don't think that's a problem though. The information is still available to a user that really cares by checking the type of `_2`, so it honestly feels like a bit of an improvement to me. r? mir
…, r=cuviper Avoid heap allocation when truncating thread names Ensure that heap allocation does not occur in a thread until `std::thread` is ready. This fixes issues with custom allocators that call `std::thread::current()`, since doing so prematurely initializes `THREAD_INFO` and causes the following `thread_info::set()` to fail.
Consider `parent_count` for const param defaults Fixes rust-lang#105257
…iasko Fix invalid codegen during debuginfo lowering In order for LLVM to correctly generate debuginfo for msvc, we sometimes need to spill arguments to the stack and perform some direct & indirect offsets into the value. Previously, this code always performed those actions, even when not required as LLVM would clean it up during optimization. However, when MIR inlining is enabled, this can cause problems as the operations occur prior to the spilled value being initialized. To solve this, we first calculate the necessary offsets using just the type which is side-effect free and does not alter the LLVM IR. Then, if we are in a situation which requires us to generate the LLVM IR (and this situation only occurs for arguments, not local variables) then we perform the same calculation again, this time generating the appropriate LLVM IR as we go. r? `@tmiasko` but feel free to reassign if you want 🙂 Fixes rust-lang#105386
@bors r+ rollup=never p=6 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: a161a7b654 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (32da230): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
Successful merges:
rustc_expand
to session diagnostics #104460 (Migrate parts ofrustc_expand
to session diagnostics)SwitchTargets
#105234 (Remove unneeded field fromSwitchTargets
)parent_count
for const param defaults #105410 (Considerparent_count
for const param defaults)Failed merges:
with_forced_trimmed_paths
#105411 (Introducewith_forced_trimmed_paths
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup