Skip to content

Conversation

@nnethercote
Copy link
Contributor

Change the SmallVec size from 4 to 1, because that's sufficient in the vast majority of cases. (This doesn't affect performance in practice, so it's more of a code clarity change than a performance change.)

r? @cjgillot

Change the `SmallVec` size from 4 to 1, because that's sufficient in the
vast majority of cases. (This doesn't affect performance in practice, so
it's more of a code clarity change than a performance change.)
@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 Jan 1, 2026
@nnethercote
Copy link
Contributor Author

Let's double-check that this doesn't affect performance:

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 1, 2026
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 1, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 2, 2026

☀️ Try build successful (CI)
Build commit: 89dfb65 (89dfb65a612a2bb0ccbd33941e17ebb7c04be515, parent: fcd630976c460c819c4bbcaf107d0c94501205d8)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (89dfb65): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in 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
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 475.254s -> 475.126s (-0.03%)
Artifact size: 390.85 MiB -> 390.85 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 2, 2026
@nnethercote
Copy link
Contributor Author

No perf effect, as expected.

@bors rollup

@cjgillot
Copy link
Contributor

cjgillot commented Jan 7, 2026

Thanks!
@bors r+

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 7, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 7, 2026

📌 Commit 8ca47cd has been approved by cjgillot

It is now in the queue for this repository.

@cjgillot
Copy link
Contributor

cjgillot commented Jan 7, 2026

@bors rollup

jhpratt added a commit to jhpratt/rust that referenced this pull request Jan 8, 2026
Clarify `MoveData::init_loc_map`.

Change the `SmallVec` size from 4 to 1, because that's sufficient in the vast majority of cases. (This doesn't affect performance in practice, so it's more of a code clarity change than a performance change.)

r? @cjgillot
jhpratt added a commit to jhpratt/rust that referenced this pull request Jan 8, 2026
…r=cjgillot

Clarify `MoveData::init_loc_map`.

NVPTX does not support cycles in static initializers (see rust-lang#146787). LLVM produces an error when attempting to generate code for such constructs, like self-referential structs.

To avoid LLVM UB, we emit a post-monomorphization error on the Rust side before reaching codegen.

This is achieved by analyzing a subgraph of the "mono item graph" that only contains statics.
1. Calculate the strongly connected components (SCCs) of the graph.
2. Check for cycles (more than one node in an SCC or one node that references itself).
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
Clarify `MoveData::init_loc_map`.

Change the `SmallVec` size from 4 to 1, because that's sufficient in the vast majority of cases. (This doesn't affect performance in practice, so it's more of a code clarity change than a performance change.)

r? @cjgillot
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2026
Clarify `MoveData::init_loc_map`.

Change the `SmallVec` size from 4 to 1, because that's sufficient in the vast majority of cases. (This doesn't affect performance in practice, so it's more of a code clarity change than a performance change.)

r? @cjgillot
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2026
Clarify `MoveData::init_loc_map`.

Change the `SmallVec` size from 4 to 1, because that's sufficient in the vast majority of cases. (This doesn't affect performance in practice, so it's more of a code clarity change than a performance change.)

r? @cjgillot
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 9, 2026
Clarify `MoveData::init_loc_map`.

Change the `SmallVec` size from 4 to 1, because that's sufficient in the vast majority of cases. (This doesn't affect performance in practice, so it's more of a code clarity change than a performance change.)

r? @cjgillot
rust-bors bot added a commit that referenced this pull request Jan 9, 2026
Rollup of 11 pull requests

Successful merges:

 - #150272 (docs(core): update `find()` and `rfind()` examples)
 - #150385 (fix `Expr::can_have_side_effects` for `[x; N]` style array literal and binary expressions)
 - #150561 (Finish transition from `semitransparent` to `semiopaque` for `rustc_macro_transparency`)
 - #150574 (Clarify `MoveData::init_loc_map`.)
 - #150762 (Use functions more in rustdoc GUI tests)
 - #150808 (rename the `derive_{eq, clone_copy}` features to `*_internals`)
 - #150816 (Fix trait method anchor disappearing before user can click on it)
 - #150821 (tests/ui/borrowck/issue-92157.rs: Remove (bug not fixed))
 - #150829 (make attrs actually use `Target::GenericParam`)
 - #150834 (Add tracking issue for `feature(multiple_supertrait_upcastable)`)
 - #150864 (The aarch64-unknown-none target requires NEON, so the docs were wrong.)

r? @ghost
@rust-bors rust-bors bot merged commit 7702fb2 into rust-lang:main Jan 9, 2026
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 9, 2026
rust-timer added a commit that referenced this pull request Jan 9, 2026
Rollup merge of #150574 - MoveData-init_loc_map, r=cjgillot

Clarify `MoveData::init_loc_map`.

Change the `SmallVec` size from 4 to 1, because that's sufficient in the vast majority of cases. (This doesn't affect performance in practice, so it's more of a code clarity change than a performance change.)

r? @cjgillot
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Jan 12, 2026
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#150272 (docs(core): update `find()` and `rfind()` examples)
 - rust-lang/rust#150385 (fix `Expr::can_have_side_effects` for `[x; N]` style array literal and binary expressions)
 - rust-lang/rust#150561 (Finish transition from `semitransparent` to `semiopaque` for `rustc_macro_transparency`)
 - rust-lang/rust#150574 (Clarify `MoveData::init_loc_map`.)
 - rust-lang/rust#150762 (Use functions more in rustdoc GUI tests)
 - rust-lang/rust#150808 (rename the `derive_{eq, clone_copy}` features to `*_internals`)
 - rust-lang/rust#150816 (Fix trait method anchor disappearing before user can click on it)
 - rust-lang/rust#150821 (tests/ui/borrowck/issue-92157.rs: Remove (bug not fixed))
 - rust-lang/rust#150829 (make attrs actually use `Target::GenericParam`)
 - rust-lang/rust#150834 (Add tracking issue for `feature(multiple_supertrait_upcastable)`)
 - rust-lang/rust#150864 (The aarch64-unknown-none target requires NEON, so the docs were wrong.)

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

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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