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 8 pull requests #125691

Merged
merged 25 commits into from
May 29, 2024
Merged

Rollup of 8 pull requests #125691

merged 25 commits into from
May 29, 2024

Conversation

jieyouxu
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Urgau and others added 25 commits April 25, 2024 07:58
error: redundant explicit link target because label contains path that resolves to same destination
This adds the `only-apple`/`ignore-apple` compiletest directive, and
uses that basically everywhere instead of `only-macos`/`ignore-macos`.

Some of the updates in `run-make` are a bit redundant, as they use
`ignore-cross-compile` and won't run on iOS - but using Apple in these
is still more correct, so I've made that change anyhow.
When encountering `use foo::*;` where `foo` fails to be found, and we later
encounter resolution errors, we silence those later errors.

A single case of the above, for an *existing* import on a big codebase would
otherwise have a huge number of knock-down spurious errors.

Ideally, instead of a global flag to silence all subsequent resolve errors,
we'd want to introduce an unameable binding in the appropriate rib as a
sentinel when there's a failed glob import, so when we encounter a resolve
error we can search for that sentinel and if found, and only then, silence
that error. The current approach is just a quick proof of concept to
iterate over.

Partially address rust-lang#96799.
Add an intrinsic for `ptr::metadata`

The follow-up to rust-lang#123840, so we can remove `PtrComponents` and `PtrRepr` from libcore entirely (well, after a bootstrap update).

As discussed in <https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/.60ptr_metadata.60.20in.20MIR/near/435637808>, this introduces `UnOp::PtrMetadata` taking a raw pointer and returning the associated metadata value.

By no longer going through a `union`, this should also help future PRs better optimize pointer operations.

r? ``@oli-obk``
Add `--print=check-cfg` to get the expected configs

This PR adds a new `--print` variant `check-cfg` to get the expected configs.

Details and rational can be found on the MCP: rust-lang/compiler-team#743

``@rustbot`` label +F-check-cfg +S-waiting-on-MCP
r? ``@petrochenkov``
…workingjubilee

Make more of the test suite run on Mac Catalyst

Combined with rust-lang#125225, the only failing parts of the test suite are in `tests/rustdoc-js`, `tests/rustdoc-js-std` and `tests/debuginfo`. Tested with:
```console
./x test --target=aarch64-apple-ios-macabi library/std
./x test --target=aarch64-apple-ios-macabi --skip=tests/rustdoc-js --skip=tests/rustdoc-js-std --skip=tests/debuginfo tests
```

Will probably put up a PR later to enable _running_ on (not just compiling for) Mac Catalyst in CI, though not sure where exactly I should do so? `src/ci/github-actions/jobs.yml`?

Note that I've deliberately _not_ enabled stack overflow handlers on iOS/tvOS/watchOS/visionOS (see rust-lang#25872), but rather just skipped those tests, as it uses quite a few APIs that I'd be weary about getting rejected by the App Store (note that Swift doesn't do it on those platforms either).

r? ``@workingjubilee``

CC ``@thomcc``

``@rustbot`` label O-ios O-apple
Silence some resolve errors when there have been glob import errors

When encountering `use foo::*;` where `foo` fails to be found, and we later encounter resolution errors, we silence those later errors.

A single case of the above, for an *existing* import on a big codebase would otherwise have a huge number of knock-down spurious errors.

Ideally, instead of a global flag to silence all subsequent resolve errors, we'd want to introduce an unnameable binding in the appropriate rib as a sentinel when there's a failed glob import, so when we encounter a resolve error we can search for that sentinel and if found, and only then, silence that error. The current approach is just a quick proof of concept to iterate over.

Partially address rust-lang#96799.
miri: avoid making a full copy of all new allocations

Hopefully fixes rust-lang/miri#3637

r? ``@saethlin``
…jieyouxu

Rewrite `lto-smoke`, `simple-rlib` and `mixing-deps` `run-make` tests in `rmake.rs` format

Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
…r=onur-ozkan

Support `./x doc run-make-support --open`

Having easy access to the run-make-support documentation is invaluable when creating run-make tests using the new Rust recipes.
Tweak relations to no longer rely on `TypeTrace`

Remove `At::trace`, and inline all of the `Trace::equate`,etc methods into `At`.

The only nontrivial change is that we use `AliasTerm` to relate two unevaluated consts in the old-solver impl of `ConstEquate`, since `AliasTerm` does implement `ToTrace` and will relate the args structurally (shallowly).

r? lcnr
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like 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. labels May 29, 2024
@rustbot rustbot added T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels May 29, 2024
@jieyouxu
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented May 29, 2024

📌 Commit 4c12282 has been approved by jieyouxu

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 May 29, 2024
@bors
Copy link
Contributor

bors commented May 29, 2024

⌛ Testing commit 4c12282 with merge 7516912...

@bors
Copy link
Contributor

bors commented May 29, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 7516912 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 29, 2024
@bors bors merged commit 7516912 into rust-lang:master May 29, 2024
7 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 29, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#124251 Add an intrinsic for ptr::metadata 058425cf67f996eeed5d5a96d26f0907fcc6e318 (link)
#124320 Add --print=check-cfg to get the expected configs c6f04b656730286062a225cc0e24ef9c84a0b622 (link)
#125226 Make more of the test suite run on Mac Catalyst dd5163a3bd75c6a9c2ef277fc58730ad258d3c37 (link)
#125381 Silence some resolve errors when there have been glob impor… 3e4516c1894fd0e7a5c9cadd860c0702b88286c6 (link)
#125633 miri: avoid making a full copy of all new allocations 8969622dc8b4adb5541b0eeaa3956c6987a5b952 (link)
#125638 Rewrite lto-smoke, simple-rlib and mixing-deps `run-m… 0e5ec4319e4549fbf4f241bf92ad271e5b5d6d27 (link)
#125639 Support ./x doc run-make-support --open 457b59621205c7eea43e78261160f02a798c55ea (link)
#125664 Tweak relations to no longer rely on TypeTrace c9c7f6200ef8ecde2d1e474e1612b2990dee613d (link)

previous master: da159eb331

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 (7516912): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
1.2% [1.2%, 1.2%] 1
Improvements ✅
(primary)
-0.5% [-0.6%, -0.4%] 2
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) -0.2% [-0.6%, 0.4%] 3

Max RSS (memory usage)

Results (primary -2.0%, secondary 4.4%)

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)
3.8% [2.4%, 6.2%] 3
Regressions ❌
(secondary)
4.4% [2.4%, 6.6%] 10
Improvements ✅
(primary)
-6.3% [-8.1%, -2.3%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.0% [-8.1%, 6.2%] 7

Cycles

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

Binary size

Results (primary -0.1%, secondary -0.1%)

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.4% [0.0%, 1.3%] 8
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.6%, -0.0%] 46
Improvements ✅
(secondary)
-0.1% [-1.4%, -0.0%] 46
All ❌✅ (primary) -0.1% [-0.6%, 1.3%] 54

Bootstrap: 667.206s -> 667.785s (0.09%)
Artifact size: 318.17 MiB -> 318.10 MiB (-0.02%)

@rustbot rustbot added the perf-regression Performance regression. label May 29, 2024
@Kobzol
Copy link
Contributor

Kobzol commented May 29, 2024

@rust-timer build 058425c

Interested if this caused the binary size wins.

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (058425c): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
-0.5% [-0.6%, -0.3%] 2
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) -0.2% [-0.6%, 0.4%] 3

Max RSS (memory usage)

Results (primary -2.7%, secondary 4.0%)

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)
4.8% [2.7%, 6.9%] 2
Regressions ❌
(secondary)
4.0% [2.0%, 6.0%] 6
Improvements ✅
(primary)
-6.5% [-7.7%, -4.7%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.7% [-7.7%, 6.9%] 6

Cycles

Results (secondary 5.0%)

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)
5.0% [4.8%, 5.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.1%, secondary -0.1%)

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.3% [0.0%, 1.1%] 8
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.6%, -0.0%] 46
Improvements ✅
(secondary)
-0.1% [-1.4%, -0.0%] 46
All ❌✅ (primary) -0.1% [-0.6%, 1.1%] 54

Bootstrap: 667.206s -> 667.128s (-0.01%)
Artifact size: 318.17 MiB -> 318.24 MiB (0.02%)

@Kobzol
Copy link
Contributor

Kobzol commented May 29, 2024

Indeed it did :) Nice.

@scottmcm
Copy link
Member

Hooray for not going through unions all over the place 🙂

@pnkfelix
Copy link
Member

pnkfelix commented Jun 4, 2024

  • regression to image-opt-full
  • improvements to webrender-2022-opt-full and regex-opt-incr-patched
  • had a broad (if small) improvement to binary sizes, which was isolated to PR Add an intrinsic for ptr::metadata #124251
  • overall wins seem to outweigh losses; marking as triaged.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.