Skip to content

debuginfo: create_scope_map.rs: change discriminators map capacity to…#156515

Open
edrf0 wants to merge 1 commit into
rust-lang:mainfrom
edrf0:optimize-computer-mir-scopes
Open

debuginfo: create_scope_map.rs: change discriminators map capacity to…#156515
edrf0 wants to merge 1 commit into
rust-lang:mainfrom
edrf0:optimize-computer-mir-scopes

Conversation

@edrf0
Copy link
Copy Markdown

@edrf0 edrf0 commented May 12, 2026

… match mir.source_scopes length

Aligns discriminators FxHashMap capacity with other scope-related data structures (vars, instantiated) using mir.source_scopes.len().

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 12, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 12, 2026

r? @mejrs

rustbot has assigned @mejrs.
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, debuginfo
  • compiler, debuginfo expanded to 73 candidates
  • Random selection from 17 candidates

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 12, 2026
@Zalathar
Copy link
Copy Markdown
Member

I don't see any argument or explanation for why discriminators should have an initial capacity of mir.source_scopes.len().

What reason is there to think that that's an appropriate capacity?

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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