Skip to content
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 7 pull requests #108070

Merged
merged 24 commits into from
Feb 15, 2023
Merged

Rollup of 7 pull requests #108070

merged 24 commits into from
Feb 15, 2023

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

aliemjay and others added 24 commits January 17, 2023 18:38
See the inline comments for the description of the new algorithm.
Specifically remove V, which can always be VariantIdx, and F, which can
always be Layout.
Since libctru 2.1.2 was released
(https://github.com/devkitPro/libctru/releases/tag/v2.1.2) we should be
able to use real #[thread_local] without corruption issues on the 3DS
target.
This is required due to `BCryptGenRandom` failing to load the necessary dll on some systems.
rework min_choice algorithm of member constraints

See [this comment](rust-lang#105300 (comment)) for the description of the new algorithm.

Fixes rust-lang#63033
Fixes rust-lang#104639

This uses a more general algorithm than rust-lang#89056 that doesn't treat `'static` as a special case. It thus accepts more code. For example:
```rust
async fn test2<'s>(_: &'s u8, _: &'_ &'s u8, _: &'_ &'s u8) {}
```
I claim it's more correct as well because it fixes rust-lang#104639.

cc ``@nikomatsakis`` ``@lqd`` ``@tmandry`` ``@eholk`` ``@chenyukang`` ``@oli-obk``

r? types
Remove some superfluous type parameters from layout.rs.

Specifically remove V, which can always be VariantIdx, and F, which can always be Layout.
…compiler-errors

Suggest the correct array length on mismatch

Fixes rust-lang#107156

I wasn't able to find a way to get the `Span` for the actual array size unfortunately, so this suggestion can't be applied automatically.

``@rustbot`` label +A-diagnostics
…oli-obk

Handle discriminant in DataflowConstProp

cc ``@jachris``
r? ``@JakobDegen``

This PR attempts to extend the DataflowConstProp pass to handle propagation of discriminants. We handle this by adding 2 new variants to `TrackElem`: `TrackElem::Variant` for enum variants and `TrackElem::Discriminant` for the enum discriminant pseudo-place.

The difficulty is that the enum discriminant and enum variants may alias each another. This is the issue of the `Option<NonZeroUsize>` test, which is the equivalent of rust-lang/unsafe-code-guidelines#84 with a direct write.

To handle that, we generalize the flood process to flood all the potentially aliasing places. In particular:
- any write to `(PLACE as Variant)`, either direct or through a projection, floods `(PLACE as OtherVariant)` for all other variants and `discriminant(PLACE)`;
- `SetDiscriminant(PLACE)` floods `(PLACE as Variant)` for each variant.

This implies that flooding is not hierarchical any more, and that an assignment to a non-tracked place may need to flood a tracked place. This is handled by `for_each_aliasing_place` which generalizes `preorder_invoke`.

As we deaggregate enums by putting `SetDiscriminant` last, this allows to propagate the value of the discriminant.

This refactor will allow to make rust-lang#107009 able to handle discriminants too.
…le-thread-local, r=Nilstrieb

Enable `#[thread_local]` on armv6k-nintendo-3ds

Since [libctru 2.1.2](https://github.com/devkitPro/libctru/releases/tag/v2.1.2)  was released we should now be able to use real `#[thread_local]` without corruption issues on the 3DS target.

CC `@Meziu` `@AzureMarker` `@Techie-Pi`
rust3ds/ctru-rs#91 (comment)
…enkov

Un📦ing the Resolver

r? `@petrochenkov`

pulled out of rust-lang#105462
Revert to using `RtlGenRandom` as a fallback

This is required due to `BCryptGenRandom` failing to load a dll it depends on.

Fixes rust-lang#108059
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Feb 15, 2023
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 15, 2023

📌 Commit ef6de70 has been approved by Dylan-DPC

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 15, 2023
@bors
Copy link
Contributor

bors commented Feb 15, 2023

⌛ Testing commit ef6de70 with merge 999ac5f...

@bors
Copy link
Contributor

bors commented Feb 15, 2023

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 999ac5f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 15, 2023
@bors bors merged commit 999ac5f into rust-lang:master Feb 15, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 15, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Perf Build Sha
#108060 8d97fafecb45c15b8aee420e8e2f591f93dbc7a3
#108032 d485aaff4ae36fc25ab46c5411bb34ff398e5d39
#107968 4131227d983ee834d6e30c8674da824337cb4ea1
#107411 65d694f368b8bdbe60dffa06ebf0c7252c02b7db
#107173 bc46b174c7d7c4519867e8420067e7e69ef4606c
#107163 c652f60c53085c3e4f79ec292ff87e4a10c277c4
#105300 fb79a0e86f94341ef454759135f2564e3d887d10

previous master: 068161ea48

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@Dylan-DPC Dylan-DPC deleted the rollup-v6xw7vk branch February 15, 2023 13:17
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (999ac5f): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [1.1%, 4.0%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.