Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 4 pull requests #123264

Merged
merged 44 commits into from
Mar 31, 2024
Merged

Rollup of 4 pull requests #123264

merged 44 commits into from
Mar 31, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 30 commits March 26, 2024 08:27
…lfJung

we have to ignore RUSTC_WORKSPACE_WRAPPER as well

This matches what we do with RUSTC_WRAPPER.
cargo-miri, miri-script, tests/ui: misc simplifications and comments

Parts of rust-lang/miri#3411 that can be landed now.
There should never be an `Active` but not initialized node in the
borrow tree. If such a node exists, and if it has a protector, then
on a foreign read, it could become disabled. This leads to some
problems when formally proving that read-reordering optimizations are
sound.

The root node is the only node for which this can happen, since all
other nodes can only become `Active` when actually used. But special-
casing the root node here is annoying to reason about, everything
becomes much nicer if we can simply say that *all* `Active` nodes
must be initialized. This requires making the root node default-
initialized.

This is also more intuitive, since the root arguably becomes ini-
tialized during the allocation, which can be considered a write.
…d-root, r=RalfJung

Tree Borrows: Make tree root always be initialized

This PR fixes a slight annoyance we discovered while formally proving that certain optimizations are sound with Tree Borrows. In particular... (copied from the commit message):

There should never be an `Active` but not initialized node in the borrow tree. If such a node exists, and if it has a protector, then on a foreign read, it could become disabled. This leads to some problems when formally proving that read moving optimizations are sound.

The root node is the only node for which this can happen, since all other nodes can only become `Active` when actually used. But special-casing the root node here is annoying to reason about, everything becomes much nicer if we can simply say that *all* `Active` nodes must be initialized. This requires making the root node default-initialized.

This is also more intuitive, since the root arguably becomes initialized during the allocation, which can be considered a write.
add eyre to test-cargo-miri

Same as anyhow: custom build probe, widely used.
avoid mutating the global environment

`remove_var` is just as bad as `set_var`, let's not do that.
and remove serde_derive, since the --extern .so file was really just a consequence of building a proc macro
test-cargo-miri: add proc-macro2

This is already in the dependency tree of `serde_derive`, but I guess there is is a host dependency, here it is a target dependency.

The logic is presumably the same as in anyhow, so we don't need both; let's test the one that is more widely used.
bors and others added 13 commits March 30, 2024 15:45
make some doc comments not doc tests

`./miri test --doc` will run doctests even if we have them disabled (that's a cargo quirk: rust-lang/cargo#13668). This fixes that command to not fail.
run GC stress test only for host tests

I suspect these are a significant contributor to our Linux CI job being by far the slowest currently. Let's see.

We have Linux, Windows, and macOS hosts so all major OSes are still covered.
…ency, r=RalfJung

cotrol stacked borrows consistency check with its own feature flag

Fixes rust-lang/miri#3431
Log BOLT args in bootstrap `rustc` shim

Before, the BOLT argument would not be logged, because it was only added after the logging has happened.

Found by `@RalfJung` [here](rust-lang#116352 (comment)).
Stop calling visitors `V`

Renames some visitors which currently have the unhelpful name of `V`. It's not self-documenting, and there is no situation where saving a few bytes in source code helps anyone.

Stacked on top of rust-lang#123202 due to conflict.
…indices, r=compiler-errors

pattern analysis: Require enum indices to be contiguous

We had a cfg-hack to allow rust-analyzer to use non-contiguous indices for its enum variants. Unfortunately this no longer works if r-a uses the in-tree version of the crate.

This PR removes the hack, and on the r-a side we'll have to use contiguous indices but that's not too hard.

r? `@compiler-errors`
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Mar 31, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=4

@bors
Copy link
Contributor

bors commented Mar 31, 2024

📌 Commit 9abf4bc has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors 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 Mar 31, 2024
@bors
Copy link
Contributor

bors commented Mar 31, 2024

⌛ Testing commit 9abf4bc with merge 395f780...

@bors
Copy link
Contributor

bors commented Mar 31, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 395f780 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 31, 2024
@bors bors merged commit 395f780 into rust-lang:master Mar 31, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 31, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#123189 Log BOLT args in bootstrap rustc shim e779ebed865c5956cb291f30885e82a1038d4fb4 (link)
#123211 Stop calling visitors V 4c036ac5290c856d1cd82679665383a4d0b7dbe6 (link)
#123242 pattern analysis: Require enum indices to be contiguous 99d33c4866c19774c5a94bea63874c73c63be4db (link)
#123260 Miri subtree update 6b50fc4649259b6582602952732da5bd289e3a45 (link)

previous master: 688c30dc9f

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
Collaborator

Finished benchmarking commit (395f780): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.6% [-0.6%, -0.6%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.2% [-2.2%, -2.2%] 1

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: 669.42s -> 668.134s (-0.19%)
Artifact size: 315.72 MiB -> 315.67 MiB (-0.02%)

@matthiaskrgr matthiaskrgr deleted the rollup-smyy7j9 branch September 1, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

9 participants