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

match lowering: pre-simplify or-patterns too #121715

Merged
merged 3 commits into from
Mar 2, 2024

Conversation

Nadrieril
Copy link
Member

This is the final part of my work to simplify match pairs early: now we do it for or-patterns too. This makes it possible to collect fake borrows separately from the main match lowering algorithm. That'll enable more simplifications of or-pattern handling.

Note: I was tempted to have Candidate contain a FlatPat, but there are so many places that use candidate.match_pairs etc directly that I chose not to.

r? @matthewjasper

@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 Feb 27, 2024
@rust-log-analyzer

This comment has been minimized.

@Nadrieril

This comment was marked as outdated.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 28, 2024
@Nadrieril

This comment was marked as outdated.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 28, 2024
@Nadrieril
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 28, 2024
@bors
Copy link
Contributor

bors commented Feb 28, 2024

⌛ Trying commit ae1e1bd with merge 7a66fe0...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 28, 2024
match lowering: pre-simplify or-patterns too

This is the final part of my work to simplify match pairs early: now we do it for or-patterns too. This makes it possible to collect fake borrows separately from the main match lowering algorithm. That'll enable more simplifications of or-pattern handling.

Note: I was tempted to have `Candidate` contain a `FlatPat`, but there are so many places that use `candidate.match_pairs` etc directly that I chose not to.

r? `@matthewjasper`
@bors
Copy link
Contributor

bors commented Feb 28, 2024

☀️ Try build successful - checks-actions
Build commit: 7a66fe0 (7a66fe0b3197abe4ce7b23fdcac3b9ec5a7fdc52)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7a66fe0): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -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)
4.6% [4.6%, 4.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-2.3%, -1.2%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 651.239s -> 651.66s (0.06%)
Artifact size: 311.17 MiB -> 311.16 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 28, 2024
@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 1, 2024

📌 Commit ae1e1bd has been approved by matthewjasper

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 Mar 1, 2024
@Nadrieril
Copy link
Member Author

@bors rollup=maybe

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 2, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#109263 (fix typo in documentation for std::fs::Permissions)
 - rust-lang#120684 (Update E0716.md for clarity)
 - rust-lang#121715 (match lowering: pre-simplify or-patterns too)
 - rust-lang#121739 (Display short types for unimplemented trait)
 - rust-lang#121815 (Move `gather_comments`.)
 - rust-lang#121835 (Move `HandleStore` into `server.rs`.)
 - rust-lang#121847 (Remove hidden use of Global)
 - rust-lang#121861 (Use the guaranteed precision of a couple of float functions in docs)
 - rust-lang#121875 ( Account for unmet T: !Copy in E0277 message)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b2c933a into rust-lang:master Mar 2, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 2, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 2, 2024
Rollup merge of rust-lang#121715 - Nadrieril:testcase-or, r=matthewjasper

match lowering: pre-simplify or-patterns too

This is the final part of my work to simplify match pairs early: now we do it for or-patterns too. This makes it possible to collect fake borrows separately from the main match lowering algorithm. That'll enable more simplifications of or-pattern handling.

Note: I was tempted to have `Candidate` contain a `FlatPat`, but there are so many places that use `candidate.match_pairs` etc directly that I chose not to.

r? `@matthewjasper`
@Nadrieril Nadrieril deleted the testcase-or branch March 2, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants