Skip to content

resolve: Introduce separate (Local,Extern)ModuleData structures for local and external modules respectively#156362

Open
petrochenkov wants to merge 11 commits intorust-lang:mainfrom
petrochenkov:modata
Open

resolve: Introduce separate (Local,Extern)ModuleData structures for local and external modules respectively#156362
petrochenkov wants to merge 11 commits intorust-lang:mainfrom
petrochenkov:modata

Conversation

@petrochenkov
Copy link
Copy Markdown
Contributor

Besides the CommonModuleData core they need to keep quite different data.

This is a follow up to #155242.
The remaining piece is dismantling CommonModuleData::lazy_resolutions, but it would be better done separately.

@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 May 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 9, 2026

r? @nnethercote

rustbot has assigned @nnethercote.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 17 candidates

@petrochenkov
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue
Just in case.

@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 9, 2026
rust-bors Bot pushed a commit that referenced this pull request May 9, 2026
resolve: Introduce separate `(Local,Extern)ModuleData` structures for local and external modules respectively
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 9, 2026

☀️ Try build successful (CI)
Build commit: aa5ec85 (aa5ec8516b3b1b6b87e57a50c0ba572d6727f2e7, parent: 0490dd938541ad996c5ad1ec6e274012afe3e1d4)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (aa5ec85): comparison URL.

Overall result: ❌✅ regressions and improvements - 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
@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.2%, 0.3%] 9
Regressions ❌
(secondary)
0.3% [0.1%, 0.7%] 24
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 6
Improvements ✅
(secondary)
-0.7% [-1.2%, -0.2%] 2
All ❌✅ (primary) 0.1% [-0.3%, 0.3%] 15

Max RSS (memory usage)

Results (primary 1.9%, 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)
3.5% [1.5%, 5.4%] 2
Regressions ❌
(secondary)
5.7% [5.6%, 5.8%] 2
Improvements ✅
(primary)
-1.3% [-1.3%, -1.3%] 1
Improvements ✅
(secondary)
-1.2% [-2.3%, -0.6%] 7
All ❌✅ (primary) 1.9% [-1.3%, 5.4%] 3

Cycles

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

Binary size

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

Bootstrap: 497.416s -> 499.549s (0.43%)
Artifact size: 397.18 MiB -> 397.15 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 May 9, 2026
@rust-bors

This comment has been minimized.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 9, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@petrochenkov
Copy link
Copy Markdown
Contributor Author

The parent and kind commits are probably responsible for the regressions.
Or introduction of enum Module itself, with all access to inner data going through matching on it.

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

Labels

perf-regression Performance regression. 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.

4 participants