-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 5 pull requests #99210
Rollup of 5 pull requests #99210
Conversation
…n the layout_scalar_valid_range logic
Inline assembly uses the target features to determine which registers are available on the current target. However it needs to be able to access unstable target features for this. Fixes rust-lang#99071
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
…li-obk Lower let-else in MIR This MR will switch to lower let-else statements in MIR building instead. To lower let-else in MIR, we build a mini-switch two branches. One branch leads to the matching case, and the other leads to the `else` block. This arrangement will allow temporary lifetime analysis running as-is so that the temporaries are properly extended according to the same rule applied to regular `let` statements. cc rust-lang#87335 Fix rust-lang#98672
`UnsafeCell` blocks niches inside its nested type from being available outside fixes rust-lang#87341 This implements the plan by `@eddyb` in rust-lang#87341 (comment) Somewhat related PR (not strictly necessary, but that cleanup made this PR simpler): rust-lang#94527
… r=petrochenkov diagnostics: error messages when struct literals fail to parse If an expression is supplied where a field is expected, the parser can become convinced that it's a shorthand field syntax when it's not. This PR addresses it by explicitly recording the permitted `:` token immediately after the identifier, and also adds a suggestion to insert the name of the field if it looks like a complex expression. Fixes rust-lang#98917
…=davidtwco Keep unstable target features for asm feature checking Inline assembly uses the target features to determine which registers are available on the current target. However it needs to be able to access unstable target features for this. Fixes rust-lang#99071
…snippet, r=cjgillot Refactor: remove an unnecessary `span_to_snippet` `span_suggestion_hidden` does not show the suggested code and the suggestion is used just for rustfix, so `span_to_snippet` is unnecessary here.
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c80dde4): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
Rollup of 5 pull requests Successful merges: - rust-lang#98574 (Lower let-else in MIR) - rust-lang#99011 (`UnsafeCell` blocks niches inside its nested type from being available outside) - rust-lang#99030 (diagnostics: error messages when struct literals fail to parse) - rust-lang#99155 (Keep unstable target features for asm feature checking) - rust-lang#99199 (Refactor: remove an unnecessary `span_to_snippet`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
@Amanieu it appears that maybe this regression is coming from #99155. Here's the top results from running a cachgrind diff:
Notice that the top result is in LLVM for feature detection which would make sense perhaps if |
This is quite surprising, I wasn't expecting this code to be hot. It's only called at startup, and even then only twice instead of once. I will see if I can change it to only query the LLVM features once. |
It is quite concerning that a whole 5% of the compilation time of "hello world" is just querying LLVM for the list of target features. Perhaps we should consider moving the feature selection logic to rustc in the future. |
That is surprising. Should we try to capture this in an issue? This is definitely a perf relevant piece of info that would be good to move out of this PR. |
I looked at this I couldn't see how rustc could do better given the LLVM API, but I could easily have overlooked something. |
Here are the notes I wrote down at the time:
|
Rollup of 5 pull requests Successful merges: - rust-lang#98574 (Lower let-else in MIR) - rust-lang#99011 (`UnsafeCell` blocks niches inside its nested type from being available outside) - rust-lang#99030 (diagnostics: error messages when struct literals fail to parse) - rust-lang#99155 (Keep unstable target features for asm feature checking) - rust-lang#99199 (Refactor: remove an unnecessary `span_to_snippet`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Successful merges:
UnsafeCell
blocks niches inside its nested type from being available outside #99011 (UnsafeCell
blocks niches inside its nested type from being available outside)span_to_snippet
#99199 (Refactor: remove an unnecessaryspan_to_snippet
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup