Skip to content

Rollup of 8 pull requests - #136331

Merged
bors merged 24 commits into
rust-lang:masterfrom
jhpratt:rollup-curo1f4
Jan 31, 2025
Merged

Rollup of 8 pull requests#136331
bors merged 24 commits into
rust-lang:masterfrom
jhpratt:rollup-curo1f4

Conversation

@jhpratt

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tgross35and others added 24 commits January 27, 2025 07:54
This has been unstably const since [1], but a tracking issue was never
created. Per discussion on Zulip [2], there should not be any blockers
to making this const-stable. The function does not provide any
functionality at compile time but does allow code reuse between const-
and non-const functions, so stabilize it here.
[1]: rust-lang#92226
[2]: https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/const_black_box
`NamedVarMap` is extremely similar to `ResolveBoundVars`. The former
contains two `UnordMap<ItemLocalId, T>` fields (obscured behind
`ItemLocalMap` typedefs). The latter contains two
`SortedMap<ItemLocalId, T>` fields. We construct a `NamedVarMap` and
then convert it into a `ResolveBoundVars` by sorting the `UnordMap`s,
which is unnecessary busywork.
This commit removes `NamedVarMap` and constructs a `ResolveBoundVars`
directly. `SortedMap` and `NamedVarMap` have slightly different
perf characteristics during construction (e.g. speed of insertion) but
this code isn't hot enough for that to matter.
A few details to note.
- A `FIXME` comment is removed.
- The detailed comments on the fields of `NamedVarMap` are copied to
`ResolveBoundVars` (which has a single, incorrect comment).
- `BoundVarContext::map` is renamed.
- `ResolveBoundVars` gets a derived `Default` impl.
…, r=dtolnay
Stabilize `const_black_box`
This has been unstably const since rust-lang#92226, but a tracking issue was never created. Per [discussion on Zulip][zulip], there should not be any blockers to making this const-stable. The function does not provide any functionality at compile time but does allow code reuse between const- and non-const functions, so stabilize it here.
[zulip]: https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/const_black_box
…=Kobzol
ci: use windows 2025 for i686-mingw
try-job: i686-mingw
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 11)
Follow up
* rust-lang#134053
* rust-lang#130287
et al
As always, it's easier to review the commits one at a time. Don't use the Files Changed tab. It's confusing.
…h726
Remove `NamedVarMap`.
`NamedVarMap` is extremely similar to `ResolveBoundVars`. The former contains two `UnordMap<ItemLocalId, T>` fields (obscured behind `ItemLocalMap` typedefs). The latter contains two
`SortedMap<ItemLocalId, T>` fields. We construct a `NamedVarMap` and then convert it into a `ResolveBoundVars` by sorting the `UnordMap`s, which is unnecessary busywork.
This commit removes `NamedVarMap` and constructs a `ResolveBoundVars` directly. `SortedMap` and `NamedVarMap` have slightly different perf characteristics during construction (e.g. speed of insertion) but this code isn't hot enough for that to matter.
A few details to note.
- A `FIXME` comment is removed.
- The detailed comments on the fields of `NamedVarMap` are copied to `ResolveBoundVars` (which has a single, incorrect comment).
- `BoundVarContext::map` is renamed.
- `ResolveBoundVars` gets a derived `Default` impl.
r? `@jackh726`
…=matthewjasper
add constraint graph to polonius MIR dump
Another easy one while I work on diagnostics. This PR adds a mermaid visualization of the polonius constraint graph to the polonius MIR dump.
Adding kills is left to a future PR (until they're encoded in edges directly or I set up recording debugging info in and out of the analysis), because right now they're only computed during traversal.
[Here's](https://gistpreview.github.io/?096b0131e8258f9a3125c55c7ac369bc) how that looks.
r? `@matthewjasper` but as always feel free to reroll.
LLVM changed the nocapture attribute to captures(none)
This updates RustWrapper.cpp and tests after
llvm/llvm-project#123181
some test suite cleanups
found while checking `compare-mode next-solver`
r? `@oli-obk`
<sub> [lcnr](https://github.com/rust-lang/rust/commits?author=lcnr) authored and JJ_EMPTY_STRING committed </sub>
float::min/max: mention the non-determinism around signed 0
Turns out this can actually produce different results on different machines [in practice](rust-lang#83984 (comment)); that seems worth documenting. I assume LLVM will happily const-fold these operations so so there could be different results for the same input even on the same machine, depending on whether things get const-folded or not.
`@nikic` I remember there was an LLVM soundness fix regarding scalar evolution for loops that had to recognize certain operations as non-deterministic... it seems to me that pass would also have to avoid predicting the result of `llvm.{min,max}num`, for the same reason?
r? `@tgross35`
Cc `@rust-lang/libs-api`
If this lands we should also make Miri non-deterministic here.
Fixesrust-lang#83984
@rustbotrustbot added A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 31, 2025
@rustbotrustbot added the rollup A PR which is a rollup label Jan 31, 2025
@jhpratt

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@bors

bors commented Jan 31, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 08dc8c9 has been approved by jhpratt

It is now in the queue for this repository.

@borsbors 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 31, 2025
@bors

bors commented Jan 31, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 08dc8c9 with merge 25a1657...

@bors

bors commented Jan 31, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing 25a1657 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jan 31, 2025
@bors
bors merged commit 25a1657 into rust-lang:masterJan 31, 2025
@rustbotrustbot added this to the 1.86.0 milestone Jan 31, 2025
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR#MessagePerf Build Sha
#135414Stabilize const_black_boxe35fa947b346f059ce8a37e28322ee06c92344a9 (link)
#136150ci: use windows 2025 for i686-mingwf3a3d6f3440ae5d5b5cca5fa19610779d77c7f52 (link)
#136258rustdoc: rename issue-\d+.rs tests to have meaningful nam…c6383c267cca8d79a6032aa5719cbbbf207a5ac0 (link)
#136270Remove NamedVarMap.4d947b86233231287dd319f8ec24a34a5400e0ff (link)
#136278add constraint graph to polonius MIR dumpf9f9781e1a139451f6247d17679bfbfd07960704 (link)
#136287LLVM changed the nocapture attribute to captures(none)cd8d7591de84ff8a54bf20d0fb7a99da01be97ec (link)
#136291some test suite cleanups64fc37bfd1c24805ce830497438247dfcf400aa0 (link)
#136296float::min/max: mention the non-determinism around signed 05f96fe9807879add66ca29a8e4c0878953ef7d07 (link)

previous master: c37fbd873a

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (25a1657): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
0.3%[0.3%, 0.3%]2
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.4%[-0.5%, -0.2%]2
All ❌✅ (primary)--0

Max RSS (memory usage)

Results (primary 4.7%, secondary 1.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
4.7%[4.7%, 4.7%]1
Regressions ❌
(secondary)
1.5%[1.5%, 1.5%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)4.7%[4.7%, 4.7%]1

Cycles

Results (primary 2.4%, secondary 3.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
2.4%[2.0%, 2.7%]5
Regressions ❌
(secondary)
3.3%[2.7%, 4.2%]6
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.4%[2.0%, 2.7%]5

Binary size

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

Bootstrap: 776.084s -> 777.178s (0.14%)
Artifact size: 328.86 MiB -> 328.82 MiB (-0.01%)

@jhpratt
jhpratt deleted the rollup-curo1f4 branch February 5, 2025 05:18
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this pull request Apr 18, 2025
Rollup of 8 pull requests
Successful merges:
- rust-lang#135414 (Stabilize `const_black_box`)
- rust-lang#136150 (ci: use windows 2025 for i686-mingw)
- rust-lang#136258 (rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 11))
- rust-lang#136270 (Remove `NamedVarMap`.)
- rust-lang#136278 (add constraint graph to polonius MIR dump)
- rust-lang#136287 (LLVM changed the nocapture attribute to captures(none))
- rust-lang#136291 (some test suite cleanups)
- rust-lang#136296 (float::min/max: mention the non-determinism around signed 0)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcmerged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

12 participants

@jhpratt@bors@rust-timer@rustbot@tgross35@notriddle@marcoieni@nnethercote@lqd@zmodem@lcnr@RalfJung