Skip to content

Decouple SCC annotations from SCCs #139965

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

Merged

Conversation

amandasystems
Copy link
Contributor

This rewires SCC annotations to have them be a separate, visitor-type data structure. It was broken out of #130227, which needed them to be able to remove unused annotations after computation without recomputing the SCCs themselves.

As a drive-by it also removes some redundant code from the hot loop in SCC construction for a performance improvement.

r? lcnr

@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 Apr 17, 2025
@lcnr
Copy link
Contributor

lcnr commented Apr 17, 2025

@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 Apr 17, 2025
@rust-log-analyzer

This comment has been minimized.

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2025
…c-annotations, r=<try>

Decouple SCC annotations from SCCs

This rewires SCC annotations to have them be a separate, visitor-type data structure. It was broken out of rust-lang#130227, which needed them to be able to remove unused annotations after computation without recomputing the SCCs themselves.

As a drive-by it also removes some redundant code from the hot loop in SCC construction for a performance improvement.

r? lcnr
@bors
Copy link
Collaborator

bors commented Apr 17, 2025

⌛ Trying commit ae763d6 with merge 207b712...

@bors
Copy link
Collaborator

bors commented Apr 17, 2025

☀️ Try build successful - checks-actions
Build commit: 207b712 (207b712831b7b56fe9f65a990e17ad17f59246e1)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (207b712): comparison URL.

Overall result: ✅ improvements - 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 is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.7%, secondary -1.7%)

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.9% [0.4%, 2.3%] 11
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.6%, -0.4%] 2
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) 0.7% [-0.6%, 2.3%] 13

Cycles

Results (primary 0.5%, secondary 3.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)
0.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
3.5% [3.5%, 3.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.5%, 0.5%] 1

Binary size

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

Bootstrap: 775.789s -> 774.37s (-0.18%)
Artifact size: 364.79 MiB -> 364.78 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 17, 2025
@amandasystems amandasystems force-pushed the marginally-improved-scc-annotations branch from ae763d6 to f294181 Compare April 22, 2025 10:30
@amandasystems amandasystems force-pushed the marginally-improved-scc-annotations branch from 5a84e26 to 7291153 Compare April 25, 2025 12:42
This rewires SCC annotations to have them be a separate,
visitor-type data structure. It was broken out of rust-lang#130227,
which needed them to be able to remove unused annotations
after computation without recomputing the SCCs themselves.

As a drive-by it also removes some redundant code from
the hot loop in SCC construction for a performance improvement.
@amandasystems
Copy link
Contributor Author

@bors r=@lcnr

@bors
Copy link
Collaborator

bors commented Apr 30, 2025

@amandasystems: 🔑 Insufficient privileges: Not in reviewers

@amandasystems
Copy link
Contributor Author

Oh, seems I misunderstood that piece of jargon then

@lcnr
Copy link
Contributor

lcnr commented Apr 30, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 30, 2025

📌 Commit b660ab9 has been approved by lcnr

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 Apr 30, 2025
@bors
Copy link
Collaborator

bors commented May 1, 2025

⌛ Testing commit b660ab9 with merge 618d7a1...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 1, 2025
…c-annotations, r=lcnr

Decouple SCC annotations from SCCs

This rewires SCC annotations to have them be a separate, visitor-type data structure. It was broken out of rust-lang#130227, which needed them to be able to remove unused annotations after computation without recomputing the SCCs themselves.

As a drive-by it also removes some redundant code from the hot loop in SCC construction for a performance improvement.

r? lcnr
@rust-log-analyzer
Copy link
Collaborator

The job armhf-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
error: test run failed!
status: exit status: 101
command: RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUST_TEST_THREADS="4" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "run" "0" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coercion/coerce-reborrow-imm-ptr-arg/a"
--- stdout -------------------------------
uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coercion/coerce-reborrow-imm-ptr-arg/a", waiting for result
------------------------------------------
--- stderr -------------------------------

thread 'main' panicked at src/tools/remote-test-client/src/main.rs:309:9:
client.read_exact(&mut header) failed with Connection reset by peer (os error 104)

@bors
Copy link
Collaborator

bors commented May 1, 2025

💔 Test failed - checks-actions

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

💔 Test failed - checks-actions

That seems very spurious to me

@tmiasko
Copy link
Contributor

tmiasko commented May 1, 2025

@bors retry #97669

@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 May 1, 2025
@bors
Copy link
Collaborator

bors commented May 1, 2025

⌛ Testing commit b660ab9 with merge 3350c1eb3fd8fe1bee1ed4c76944d707bd256876...

@bors
Copy link
Collaborator

bors commented May 1, 2025

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing 3350c1e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 1, 2025
@bors bors merged commit 3350c1e into rust-lang:master May 1, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone May 1, 2025
Copy link

github-actions bot commented May 1, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 0e517d3 (parent) -> 3350c1e (this PR)

Test differences

Show 13 test diffs

Stage 1

  • graph::scc::tests::test_simple_cycle_max: pass -> [missing] (J0)

Additionally, 12 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 3350c1eb3fd8fe1bee1ed4c76944d707bd256876 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 6682.2s -> 5306.3s (-20.6%)
  2. x86_64-apple-1: 9135.6s -> 10451.1s (14.4%)
  3. dist-apple-various: 8195.5s -> 7142.7s (-12.8%)
  4. dist-x86_64-apple: 7301.6s -> 8097.6s (10.9%)
  5. dist-arm-linux: 4670.0s -> 5132.0s (9.9%)
  6. i686-msvc-2: 7167.6s -> 7873.5s (9.8%)
  7. dist-aarch64-apple: 5144.1s -> 4716.4s (-8.3%)
  8. dist-x86_64-mingw: 7647.8s -> 8262.0s (8.0%)
  9. i686-gnu-1: 8848.1s -> 8392.0s (-5.2%)
  10. x86_64-gnu-tools: 5568.4s -> 5838.1s (4.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3350c1e): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 2
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 2

Max RSS (memory usage)

Results (primary 0.2%, secondary -1.1%)

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.7% [0.4%, 2.9%] 25
Regressions ❌
(secondary)
2.6% [2.3%, 3.0%] 2
Improvements ✅
(primary)
-1.1% [-2.1%, -0.4%] 8
Improvements ✅
(secondary)
-2.9% [-3.6%, -2.0%] 4
All ❌✅ (primary) 0.2% [-2.1%, 2.9%] 33

Cycles

Results (primary -0.2%)

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.6% [0.4%, 1.0%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.9%, -0.4%] 9
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.9%, 1.0%] 14

Binary size

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

Bootstrap: 768.358s -> 767.941s (-0.05%)
Artifact size: 365.48 MiB -> 365.55 MiB (0.02%)

@amandasystems amandasystems deleted the marginally-improved-scc-annotations branch May 2, 2025 08:32
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.

7 participants