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

Exhaustiveness: remove Matrix.wildcard_row #119667

Merged
merged 2 commits into from
Jan 7, 2024

Conversation

Nadrieril
Copy link
Member

@Nadrieril Nadrieril commented Jan 6, 2024

To compute exhaustiveness, we check whether an extra row with a wildcard added at the end of the match expression would be reachable. We used to store an actual such row of patterns in the Matrix, but it's a bit redundant since we know it only contains wildcards. It was kept because we used it to get the type of each column (and relevancy). With this PR, we keep track of the types (and relevancy) directly.

This is part of me splitting up #119581 for ease of review.

r? @compiler-errors

It was only used to track types and relevancy, so may as well store that
directly.
@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. labels Jan 6, 2024
@compiler-errors
Copy link
Member

r=me

@Nadrieril
Copy link
Member Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Jan 6, 2024

📌 Commit 50b197c has been approved by compiler-errors

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 Jan 6, 2024
@bors
Copy link
Contributor

bors commented Jan 7, 2024

⌛ Testing commit 50b197c with merge d8b44d2...

@bors
Copy link
Contributor

bors commented Jan 7, 2024

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing d8b44d2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 7, 2024
@bors bors merged commit d8b44d2 into rust-lang:master Jan 7, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 7, 2024
@Nadrieril Nadrieril deleted the remove-wildcard-row branch January 7, 2024 15:44
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d8b44d2): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-3.0%, -2.6%] 6
All ❌✅ (primary) - - 0

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.8% [2.2%, 3.2%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.4% [-3.5%, -3.3%] 2
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 665.728s -> 666.132s (0.06%)
Artifact size: 308.41 MiB -> 308.40 MiB (-0.00%)

@Nadrieril
Copy link
Member Author

Nice improvement on instructions but no change on cycles, as usual for match-stress

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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants