Skip to content

[EXPERIMENT] Cache the MIR location map on the body and share it with borrowck and MoveData - #160572

Draft
xmakro wants to merge 2 commits into
rust-lang:mainfrom
xmakro:perf/move-data-dense-location-map
Draft

xmakro wants to merge 2 commits into
rust-lang:mainfrom
xmakro:perf/move-data-dense-location-map

Conversation

@xmakro

@xmakro xmakro commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

cleanup, suggested by @cjgillot in #160245 (comment)

@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 Aug 5, 2026
@mu001999

Copy link
Copy Markdown
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 Aug 10, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 10, 2026
…try>

Back MoveData's location maps with a shared DenseLocationMap
@rust-bors

rust-bors Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a0028bb (a0028bb090f8b585ad0360ba7886aac401184c29)
Base parent: 969b803 (969b803cbe1d4499f841ae0a49c637d8c70a0458)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a0028bb): comparison URL.

Overall result: ❌ regressions - please read:

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.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@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.3% [0.3%, 0.3%] 5
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 5

Max RSS (memory usage)

Results (secondary -0.3%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.3% [0.5%, 9.6%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-4.9%, -0.4%] 11
All ❌✅ (primary) - - 0

Cycles

Results (primary 2.2%, secondary 0.4%)

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.0%, 2.3%] 3
Regressions ❌
(secondary)
1.1% [0.6%, 2.5%] 17
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-2.5%, -0.4%] 11
All ❌✅ (primary) 2.2% [2.0%, 2.3%] 3

Binary size

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

Bootstrap: 458.441s -> 459.465s (0.22%)
Artifact size: 398.59 MiB -> 398.61 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 10, 2026
@xmakro
xmakro force-pushed the perf/move-data-dense-location-map branch 2 times, most recently from e2f00d3 to 424c4ce Compare October 10, 2026 16:03
@xmakro xmakro changed the title Back MoveData's location maps with a shared DenseLocationMap Cache the MIR location map on the body and share it with borrowck and MoveData Oct 11, 2026
@xmakro
xmakro force-pushed the perf/move-data-dense-location-map branch from 424c4ce to 18fd091 Compare October 11, 2026 04:12
@xmakro xmakro changed the title Cache the MIR location map on the body and share it with borrowck and MoveData [EXPERIMENT] Cache the MIR location map on the body and share it with borrowck and MoveData Oct 11, 2026
@panstromek

Copy link
Copy Markdown
Contributor

@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 Oct 11, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 11, 2026
…try>

[EXPERIMENT] Cache the MIR location map on the body and share it with borrowck and MoveData
@rust-bors

rust-bors Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 0465fce (0465fcebe6789a7f1499efdffaa30cd55fe55239)
Base parent: 6f5da40 (6f5da406b56c2db6607202b63daee73aa8c61297)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (0465fce): 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 rustc-perf
@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.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.3% [-0.6%, -0.1%] 7
Improvements ✅
(secondary)
-0.4% [-0.7%, -0.1%] 38
All ❌✅ (primary) -0.3% [-0.6%, -0.1%] 7

Max RSS (memory usage)

Results (primary -0.0%, secondary 3.4%)

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

mean range count
Regressions ❌
(primary)
3.2% [2.6%, 3.8%] 2
Regressions ❌
(secondary)
5.6% [3.3%, 12.1%] 7
Improvements ✅
(primary)
-1.1% [-1.4%, -0.8%] 6
Improvements ✅
(secondary)
-1.8% [-2.9%, -1.0%] 3
All ❌✅ (primary) -0.0% [-1.4%, 3.8%] 8

Cycles

Results (secondary 1.8%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.6% [2.4%, 8.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-3.8%, -1.0%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 488.596s -> 488.759s (0.03%)
Artifact size: 407.26 MiB -> 406.76 MiB (-0.12%)

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Oct 11, 2026
@panstromek

Copy link
Copy Markdown
Contributor

cc @jackh726 - I believe you've been thinking about this as well, right? (Maybe I misremember, feel free to ignore me)

@rust-bors

rust-bors Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

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

@jackh726

Copy link
Copy Markdown
Member

Uh, yeah. I mean, I would like to get rid of Rc/Arc entirely here.

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.

6 participants