Skip to content

match lowering: simplify empty candidate selection - #121172

Merged
bors merged 11 commits into
rust-lang:masterfrom
Nadrieril:simplify-empty-selection
Feb 21, 2024
Merged

bors merged 11 commits into
rust-lang:masterfrom
Nadrieril:simplify-empty-selection

Conversation

@Nadrieril

Copy link
Copy Markdown
Member

In match lowering, match_simplified_candidates is tasked with removing candidates that are fully matched and linking them up properly. The code that does that was needlessly complicated; this PR simplifies it.

The overall change isn't big but I split it up into tiny commits to convince myself that I was correctly preserving behavior. The test changes are all due to the first commit. Let me know if you'd prefer me to split up the PR to make reviewing easier.

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 16, 2024
@Nadrieril

Copy link
Copy Markdown
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 16, 2024
@bors

bors commented Feb 16, 2024

Copy link
Copy Markdown
Collaborator

⌛ Trying commit 4a9cff7 with merge 1d1bfb7...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 16, 2024
…r=<try>

match lowering: simplify empty candidate selection

In match lowering, `match_simplified_candidates` is tasked with removing candidates that are fully matched and linking them up properly. The code that does that was needlessly complicated; this PR simplifies it.

The overall change isn't big but I split it up into tiny commits to convince myself that I was correctly preserving behavior. The test changes are all due to the first commit. Let me know if you'd prefer me to split up the PR to make reviewing easier.

r? `@matthewjasper`
@bors

bors commented Feb 16, 2024

Copy link
Copy Markdown
Collaborator

☀️ Try build successful - checks-actions
Build commit: 1d1bfb7 (1d1bfb7926f9f269a965c3582f73041e9c563b3e)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (1d1bfb7): 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)
8.0% [8.0%, 8.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.3% [-1.5%, 8.0%] 2

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)
4.2% [3.9%, 4.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 637.219s -> 636.695s (-0.08%)
Artifact size: 306.29 MiB -> 306.35 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 16, 2024

@matthewjasper matthewjasper left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, otherwise lgtm

@Nadrieril
Nadrieril force-pushed the simplify-empty-selection branch from 4a9cff7 to a45d892 Compare February 20, 2024 15:53
@matthewjasper

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Feb 20, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit a45d892 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 Feb 20, 2024
@bors

bors commented Feb 21, 2024

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a45d892 with merge 096598d...

@bors

bors commented Feb 21, 2024

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: matthewjasper
Pushing 096598d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 21, 2024
@bors
bors merged commit 096598d into rust-lang:master Feb 21, 2024
@rustbot rustbot added this to the 1.78.0 milestone Feb 21, 2024
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (096598d): 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)
3.0% [3.0%, 3.0%] 1
Regressions ❌
(secondary)
2.4% [2.2%, 2.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.0% [3.0%, 3.0%] 1

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: 640.784s -> 640.589s (-0.03%)
Artifact size: 308.61 MiB -> 308.63 MiB (0.01%)

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