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 11 pull requests #127096

Merged
merged 27 commits into from
Jun 29, 2024
Merged

Rollup of 11 pull requests #127096

merged 27 commits into from
Jun 29, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jieyouxu and others added 27 commits April 17, 2024 19:23
- Syntax extensions are replaced by proc macros.
- Add rationale for why AST validation pass need to be run
  post-expansion and why the pass is needed in the first place.
as request T-lang is requesting some major changes in the lint inner
workings in rust-lang#126768#issuecomment-2192634762
These table entries have wrong number of columns so the "notes" field is
missing from the rendered page. Fix by removing excess empty columns.
seems to have escaped bootstrap
When the LoongArch targets were first introduced, the LLVM support was
still immature and various tools were not supported on LoongArch.
Nowadays most infra is in place, so it is time to enable them on
LoongArch to provide a better experience for users of these targets.
Plus, the profiler support is needed by Chromium, so better provide it
in the official artifacts.
Add test for fn pointer duplication.

I managed to make it fail when removing provenance checks in GVN.

cc rust-lang#123670

r? ``````@oli-obk``````
…docs, r=wesleywiser

Update AST validation module docs

Drive-by doc update for AST validation pass:

- Syntax extensions are replaced by proc macros.
- Add rationale for why AST validation pass need to be run
  post-expansion and why the pass is needed in the first place.

This was discussed during this week's [rustc-dev-guide reading club](https://rust-lang.zulipchat.com/#narrow/stream/196385-t-compiler.2Fwg-rustc-dev-guide), and the rationale was explained by cc ``````@bjorn3.``````
Switch back `non_local_definitions` lint to allow-by-default

This PR switch back (again) the `non_local_definitions` lint to allow-by-default as T-lang is requesting some (major) changes in the lint inner workings in rust-lang#126768 (comment).

This PR will need to be beta-backported, as the lint is currently warn-by-default in beta.
docs: check if the disambiguator matches its suffix

Fixes rust-lang#126986

This PR makes it will not continue resolving when its disambiguator doesn't match the suffix format.
…r=lqd

Fix Markdown tables in platform-support.md

These table entries have wrong number of columns so the "notes" field is missing from the rendered page. Fix by removing excess empty columns.
… r=oli-obk

Enable const casting for `f16` and `f128`

I have an open PR to the Miri repo adding tests for this behavior rust-lang/miri#3688, but that unfortunately hits the ICE path here. The changes seem reasonably low risk that it might be okay to merge separately from the tests, and I tested the result locally against an older version of rust-lang/miri#3688.

Cc ``````@RalfJung``````
…=dtolnay

Mark Hasher::finish as #[must_use]
Stall computing instance for drop shim until it has no unsubstituted const params

Do not inline the drop shim for types that still have unsubstituted const params.

## Why?

rust-lang#127030 ICEs because it tries to inline the drop shim for a type with an unsubstituted const param. In order to generate this shim, this requires calling the drop shim builder, which invokes the trait solver to compute whether constituent types need drop (since we compute if a type is copy to disqualify any `Drop` behavior):

https://github.com/rust-lang/rust/blob/9c3bc805dd9cb84019c124b9a50fdff1e62a7ec9/compiler/rustc_mir_dataflow/src/elaborate_drops.rs#L378

However, since we don't keep the param-env of the instance we resolved the item for, we use the wrong param-env:
https://github.com/rust-lang/rust/blob/9c3bc805dd9cb84019c124b9a50fdff1e62a7ec9/compiler/rustc_mir_transform/src/shim.rs#L278
(which is the param-env of `std::ptr::drop_in_place`)

This param-env is notably missing `ConstParamHasTy` predicates, and since we removed the type from consts in rust-lang#125958, we literally cannot prove these predicates in this (relatively) empty param-env. This currently happens in places like the MIR inliner, but may happen elsewhere such as in lints that resolve terminators.

## What?

We force the inliner to not consider calls for `drop_in_place` for types that have unsubstituted const params.

## So what?

This may negatively affect MIR inlining, but I doubt this matters in practice, and fixes a beta regression, so let's fix it. I will look into approaches for fixing this in a more maintainable way, perhaps delaying the creation of drop shim bodies until codegen (like how intrinsics work).
add () to the marker_impls macro for ConstParamTy

Seems to have escaped bootstrap
…cottmcm

Remove (deprecated & unstable) {to,from}_bits pointer methods

These unstable methods have been deprecated for more than a year (since rust-lang#95583). Remove them.

See rust-lang#91126 (comment) and https://github.com/rust-lang/rust/pull/110441/files#r1169574509.

Closes rust-lang#91126.

r? `@scottmcm`
…Kobzol

Enable full tools and profiler for LoongArch Linux targets

When the LoongArch targets were first introduced, the LLVM support was still immature and various tools were not supported on LoongArch. Nowadays most infra is in place, so it is time to enable them on LoongArch to provide a better experience for users of these targets. Plus, the profiler support is needed by Chromium, so better provide it in the official artifacts.

cc `@heiher`

try-job: dist-loongarch64-linux
try-job: dist-loongarch64-musl
@rustbot rustbot 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. labels Jun 28, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 29, 2024
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#123714 (Add test for fn pointer duplication.)
 - rust-lang#124091 (Update AST validation module docs)
 - rust-lang#127015 (Switch back `non_local_definitions` lint to allow-by-default)
 - rust-lang#127016 (docs: check if the disambiguator matches its suffix)
 - rust-lang#127029 (Fix Markdown tables in platform-support.md)
 - rust-lang#127032 (Enable const casting for `f16` and `f128`)
 - rust-lang#127055 (Mark Hasher::finish as #[must_use])
 - rust-lang#127068 (Stall computing instance for drop shim until it has no unsubstituted const params)
 - rust-lang#127070 (add () to the marker_impls macro for ConstParamTy)
 - rust-lang#127071 (Remove (deprecated & unstable) {to,from}_bits pointer methods)
 - rust-lang#127078 (Enable full tools and profiler for LoongArch Linux targets)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] miri test:false 62.432
[RUSTC-TIMING] miri test:false 2.926
    Finished `release` profile [optimized] target(s) in 0.39s
thread 'main' panicked at src/lib.rs:1712:17:
failed to copy `C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-tools\x86_64-pc-windows-msvc\release\miri.exe` to `C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-tools-bin\miri.exe`: The process cannot access the file because it is being used by another process. (os error 32)
##[endgroup]
Build completed unsuccessfully in 0:00:08
  local time: Sat, Jun 29, 2024  3:30:57 AM
  network time: Sat, 29 Jun 2024 03:30:57 GMT

@bors
Copy link
Contributor

bors commented Jun 29, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 29, 2024
@matthiaskrgr
Copy link
Member Author

@bors retry?

@matthiaskrgr
Copy link
Member Author

@bors retry

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

bors commented Jun 29, 2024

⌛ Testing commit f37272d with merge d38cd22...

@bors
Copy link
Contributor

bors commented Jun 29, 2024

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

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

rust-timer commented Jun 29, 2024

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha Manually Fired Perf Runs
#123714 Add test for fn pointer duplication. e9cfac3d94e9f96b27abf38d6944f9b8775a28e8 (link)
#124091 Update AST validation module docs b67ec1469727f602f06f577118b4423d031f9a3d (link)
#127015 Switch back non_local_definitions lint to allow-by-default 8bcc301ae2de8c79fb0c0be187ecfb3b8dbd34dd (link)
#127016 docs: check if the disambiguator matches its suffix fb31e24c89e0c6e6eecbcfe8e750ae626c495b53 (link)
#127029 Fix Markdown tables in platform-support.md eea7fe7a4167f5dd152810b67d6399d9f9b1121b (link)
#127032 Enable const casting for f16 and f128 b398648e6c879f15510d2ab8b33e2c16a12ceb0e (link)
#127055 Mark Hasher::finish as #[must_use] fba1e63e778a3ca8e37ce0978609392b25930a6d (link)
#127068 Stall computing instance for drop shim until it has no unsu… d1ff5aa93e2de2e9e56f206dfec56dd9dd0d1769 (link)
#127070 add () to the marker_impls macro for ConstParamTy 24f89076d40464aa298fc4553a16299d6c9ca8d1 (link)
#127071 Remove (deprecated & unstable) {to,from}_bits pointer metho… 970eefb2292c45cb2f90ec6e67308288651c32b0 (link) #127096 (comment)
#127078 Enable full tools and profiler for LoongArch Linux targets a1d6786802e4ec842248ae59b75adeec391a44d7 (link)

previous master: 9ed2ab3790

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

@tgross35
Copy link
Contributor

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

🎉 Congrats Bors! Only took 2 days since the initial rollup with these PRs :)

@matthiaskrgr
Copy link
Member Author

😿

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d38cd22): 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.5% [0.3%, 0.7%] 7
Regressions ❌
(secondary)
1.1% [0.2%, 1.6%] 7
Improvements ✅
(primary)
-3.4% [-6.2%, -1.2%] 12
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.9% [-6.2%, 0.7%] 19

Max RSS (memory usage)

Results (primary 2.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.

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

Cycles

Results (primary -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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.3% [-4.2%, -1.0%] 7
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.3% [-4.2%, -1.0%] 7

Binary size

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

Bootstrap: 695.135s -> 694.857s (-0.04%)
Artifact size: 324.56 MiB -> 324.45 MiB (-0.03%)

@rustbot rustbot added the perf-regression Performance regression. label Jun 29, 2024
@lqd
Copy link
Member

lqd commented Jun 29, 2024

I was like "free perf!", but of course it's the lint machinery from #127015

@pnkfelix
Copy link
Member

pnkfelix commented Jul 3, 2024

@rust-timer build 970eefb

@rust-timer

This comment has been minimized.

@pnkfelix
Copy link
Member

pnkfelix commented Jul 3, 2024

visiting for weekly rustc-perf triage

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (970eefb): comparison URL.

Overall result: no relevant changes - no action needed

Instruction count

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

Max RSS (memory usage)

Results (primary 2.7%)

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)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.7% [2.7%, 2.7%] 1

Cycles

Results (primary -2.8%)

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

Binary size

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

Bootstrap: 695.135s -> 696.29s (0.17%)
Artifact size: 324.56 MiB -> 326.62 MiB (0.64%)

@pnkfelix
Copy link
Member

pnkfelix commented Jul 3, 2024

grasping at straws

@rust-timer build fba1e63

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fba1e63): comparison URL.

Overall result: ❌ regressions - no 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
Regressions ❌
(secondary)
1.6% [1.6%, 1.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.6%)

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)
2.6% [2.6%, 2.6%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.6% [2.6%, 2.6%] 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: 695.135s -> 696.947s (0.26%)
Artifact size: 324.56 MiB -> 324.56 MiB (-0.00%)

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. perf-regression Performance regression. 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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.