Skip to content

Avoid cloning CFG-related analysis data. - #156841

Draft
dianqk wants to merge 1 commit into
rust-lang:mainfrom
dianqk:avoid-clone
Draft

dianqk wants to merge 1 commit into
rust-lang:mainfrom
dianqk:avoid-clone

Conversation

@dianqk

@dianqk dianqk commented May 22, 2026

Copy link
Copy Markdown
Member

For perf.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 22, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_ast_passes test:false 0.953
error: using `.clone()` on a ref-counted pointer
  --> compiler/rustc_middle/src/mir/basic_blocks.rs:72:9
   |
72 |         self.cache.clone()
   |         ^^^^^^^^^^^^^^^^^^ help: try: `std::sync::Arc::<mir::basic_blocks::CfgCache>::clone(&self.cache)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_ref_ptr
   = note: requested on the command line with `-D clippy::clone-on-ref-ptr`

[RUSTC-TIMING] rustc_middle test:false 22.388

@dianqk

dianqk commented May 22, 2026

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 22, 2026
rust-bors Bot pushed a commit that referenced this pull request May 22, 2026
Avoid cloning CFG-related analysis data.
@rust-bors

rust-bors Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 218c186 (218c18693cbb9ae14f53b685355647f5dbeb1e44, parent: b52edc25bfbaa955b4b83c10f998e5224c3478b2)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (218c186): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

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

Max RSS (memory usage)

Results (primary -0.1%, secondary -2.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
7.9% [7.9%, 7.9%] 1
Regressions ❌
(secondary)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
-2.8% [-3.6%, -2.3%] 3
Improvements ✅
(secondary)
-4.4% [-7.1%, -1.7%] 2
All ❌✅ (primary) -0.1% [-3.6%, 7.9%] 4

Cycles

Results (primary 2.2%, secondary -4.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.2% [-4.3%, -4.0%] 3
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Binary size

Results (primary 0.1%, secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.1%] 51
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 25
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.1%] 51

Bootstrap: 513.181s -> 524.394s (2.18%)
Artifact size: 400.52 MiB -> 400.58 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 22, 2026
@rust-bors

rust-bors Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #163970) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

4 participants