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

eval_outlives: bail out early if both regions are in the same SCC #137216

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

amandasystems
Copy link
Contributor

A drive-by optimisation of region outlives evaluation: if we are evaluating whether an outlives holds for two regions, bail out early if they are both in the same SCC.

This probably won't make a huge difference, but the cost is one comparison of SCC indices (integers).

May want a perf run, depending on how confident whomever reviewing this is!

@rustbot
Copy link
Collaborator

rustbot commented Feb 18, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 18, 2025
@compiler-errors
Copy link
Member

@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 18, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 18, 2025
…=<try>

eval_outlives: bail out early if both regions are in the same SCC

A drive-by optimisation of region outlives evaluation: if we are evaluating whether an outlives holds for two regions, bail out early if they are both in the same SCC.

This probably won't make a huge difference, but the cost is one comparison of SCC indices (integers).

May want a perf run, depending on how confident whomever reviewing this is!
@bors
Copy link
Collaborator

bors commented Feb 18, 2025

⌛ Trying commit 53effa4 with merge 3f30fe5...

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

LGTM if perf comes back good

@bors
Copy link
Collaborator

bors commented Feb 18, 2025

☀️ Try build successful - checks-actions
Build commit: 3f30fe5 (3f30fe5fbd4de981cd1aef9b11ffe4b9e2669288)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3f30fe5): 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 (primary 2.0%, secondary 2.5%)

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)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [2.0%, 2.0%] 1

Cycles

Results (secondary 3.0%)

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)
3.0% [2.5%, 3.5%] 16
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (secondary 0.0%)

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.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 775.584s -> 775.607s (0.00%)
Artifact size: 360.27 MiB -> 360.27 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 18, 2025
@amandasystems
Copy link
Contributor Author

Ok so completely useless then lol

@compiler-errors
Copy link
Member

r? compiler-errors @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Feb 18, 2025

📌 Commit 53effa4 has been approved by compiler-errors

It is now in the queue for this repository.

@rustbot rustbot assigned compiler-errors and unassigned BoxyUwU Feb 18, 2025
@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 18, 2025
@compiler-errors
Copy link
Member

It's fine as a micro-optimization, the code below does end up doing like a lot of work for no reason lol

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#136936 (Use 'yes' instead of 'while-echo' in tests/ui/process/process-sigpipe.rs except 'nto')
 - rust-lang#137026 (Stabilize (and const-stabilize) `integer_sign_cast`)
 - rust-lang#137059 (fix: Alloc new errorcode E0803 for E0495)
 - rust-lang#137177 (Update `minifier-rs` version to `0.3.5`)
 - rust-lang#137210 (compiler: Stop reexporting stuff in cg_llvm::abi)
 - rust-lang#137213 (Remove `rustc_middle::mir::tcx` module.)
 - rust-lang#137216 (eval_outlives: bail out early if both regions are in the same SCC)
 - rust-lang#137228 (Fix typo in hidden internal docs of `TrustedRandomAccess`)
 - rust-lang#137242 (Add reference annotations for the `do_not_recommend` attribute)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cf8d342 into rust-lang:master Feb 19, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 19, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2025
Rollup merge of rust-lang#137216 - amandasystems:cheap-outlives-eval, r=compiler-errors

eval_outlives: bail out early if both regions are in the same SCC

A drive-by optimisation of region outlives evaluation: if we are evaluating whether an outlives holds for two regions, bail out early if they are both in the same SCC.

This probably won't make a huge difference, but the cost is one comparison of SCC indices (integers).

May want a perf run, depending on how confident whomever reviewing this is!
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