Skip to content

Avoid unneeded work for storage removal in non-opt builds in CopyProp and GVN#155491

Open
ohadravid wants to merge 1 commit intorust-lang:mainfrom
ohadravid:faster-storage-in-copyprop-and-gvn
Open

Avoid unneeded work for storage removal in non-opt builds in CopyProp and GVN#155491
ohadravid wants to merge 1 commit intorust-lang:mainfrom
ohadravid:faster-storage-in-copyprop-and-gvn

Conversation

@ohadravid
Copy link
Copy Markdown
Contributor

@ohadravid ohadravid commented Apr 18, 2026

Fix performance regression introduced in #142531 (rust-timer comment) by only allocating local sets for the storage accounting when tcx.sess.emit_lifetime_markers().

r? saethlin

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 18, 2026

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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 18, 2026
@ohadravid ohadravid force-pushed the faster-storage-in-copyprop-and-gvn branch from 544ea18 to bb8798b Compare April 18, 2026 16:43
for (local, &head) in ssa.copy_classes().iter_enumerated() {
if local != head {
any_replacement = true;
storage_to_remove.insert(head);
Copy link
Copy Markdown
Contributor Author

@ohadravid ohadravid Apr 18, 2026

Choose a reason for hiding this comment

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

@ohadravid ohadravid force-pushed the faster-storage-in-copyprop-and-gvn branch from bb8798b to 2389a3a Compare April 18, 2026 19:13
@Kobzol
Copy link
Copy Markdown
Member

Kobzol commented Apr 18, 2026

@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 Apr 18, 2026
rust-bors bot pushed a commit that referenced this pull request Apr 18, 2026
… r=<try>

Avoid unneeded work for storage removal in non-opt builds in CopyProp and GVN
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 18, 2026

☀️ Try build successful (CI)
Build commit: 48af6e0 (48af6e0fab57d8f8b2679fe3401c5b490589dad7, parent: b2f1ccf524a3a4cf9c34545167cc23b659cf1cbd)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (48af6e0): comparison URL.

Overall result: no relevant changes - 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

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 4.2%, secondary -1.5%)

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

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

Cycles

Results (primary 2.6%, secondary 6.2%)

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

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

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 492.524s -> 492.577s (0.01%)
Artifact size: 394.41 MiB -> 394.45 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants