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 #121810

Merged
merged 19 commits into from
Mar 1, 2024
Merged

Rollup of 8 pull requests #121810

merged 19 commits into from
Mar 1, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

alexcrichton and others added 19 commits February 23, 2024 13:13
It looks like LLD will detect object files being either 32 or 64-bit
depending on any memory present. LLD will additionally reject 32-bit
objects during a 64-bit link. Previously metadata objects did not have
any memories in them which led LLD to conclude they were 32-bit objects
which broke 64-bit targets for wasm.

This commit fixes this by ensuring that for 64-bit targets there's a
memory object present to get LLD to detect it's a 64-bit target.
Additionally this commit moves away from a hand-crafted wasm encoder to
the `wasm-encoder` crate on crates.io as the complexity grows for the
generated object file.

Closes rust-lang#121460
Migrate to a simplified safety analysis that does not use visibility.

Closes rust-lang/project-safe-transmute#15
Remove aliases for `split_paths` and `join_paths` as should have been
done in <rust-lang#119748> (Bors merged the
wrong commit).
…clauses-on-ty-aliases, r=compiler-errors

Detect empty leading where clauses on type aliases

1. commit: refactor the AST of type alias where clauses
   * I could no longer bear the look of `.0.1` and `.1.0`
   * Arguably moving `split` out of `TyAlias` into a substruct might not make that much sense from a semantic standpoint since it reprs an index into `TyAlias.predicates` but it's alright and it cleans up the usage sites of `TyAlias`
2. commit: fix an oversight: An empty leading where clause is still a leading where clause
   * semantically reject empty leading where clauses on lazy type aliases
     * e.g., on `#![feature(lazy_type_alias)] type X where = ();`
   * make empty leading where clauses on assoc types trigger lint `deprecated_where_clause_location`
     * e.g., `impl Trait for () { type X where = (); }`
…iser

rustc: Fix wasm64 metadata object files

It looks like LLD will detect object files being either 32 or 64-bit depending on any memory present. LLD will additionally reject 32-bit objects during a 64-bit link. Previously metadata objects did not have any memories in them which led LLD to conclude they were 32-bit objects which broke 64-bit targets for wasm.

This commit fixes this by ensuring that for 64-bit targets there's a memory object present to get LLD to detect it's a 64-bit target. Additionally this commit moves away from a hand-crafted wasm encoder to the `wasm-encoder` crate on crates.io as the complexity grows for the generated object file.

Closes rust-lang#121460
…=compiler-errors

Safe Transmute: Revise safety analysis

This PR migrates `BikeshedIntrinsicFrom` to a simplified safety analysis (described [here](rust-lang/project-safe-transmute#15)) that does not rely on analyzing the visibility of types and fields.

The revised analysis treats primitive types as safe, and user-defined types as potentially carrying safety invariants. If Rust gains explicit (un)safe fields, this PR is structured so that it will be fairly easy to thread support for those annotations into the analysis.

Notably, this PR removes the `Context` type parameter from `BikeshedIntrinsicFrom`. Most of the files changed by this PR are just UI tests tweaked to accommodate the removed parameter.

r? `@compiler-errors`
Add proper cfg to keep only one AlignmentEnum definition for different target_pointer_widths

Detected by rust-lang#121752

Only one AlignmentEnum would be used with a specified target_pointer_width
…oli-obk

allow statics pointing to mutable statics

Fixes rust-lang#120450 for good. We can even simplify our checks: no need to specifically go looking for mutable references in const, we can just reject any reference that points to something mutable.

r? `@oli-obk`
add const test for ptr::metadata

rust-lang#121199 uncovered this as a gap in our test suite.

r? `@oli-obk`
… r=Amanieu

Remove doc aliases to PATH

Remove aliases for `split_paths` and `join_paths` as should have been done in <rust-lang#119748> (Bors merged the wrong commit).
@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-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) rollup A PR which is a rollup labels Feb 29, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Feb 29, 2024

📌 Commit b961f25 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 Feb 29, 2024
@bors
Copy link
Contributor

bors commented Feb 29, 2024

⌛ Testing commit b961f25 with merge 77be7a3...

@bors
Copy link
Contributor

bors commented Mar 1, 2024

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

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#121326 Detect empty leading where clauses on type aliases ec0845b5361848c31360365a706406d88abf13cd (link)
#121464 rustc: Fix wasm64 metadata object files 417b19f445f39264170f98d1c52c4f15a7c94b9b (link)
#121681 Safe Transmute: Revise safety analysis 03f1e90309561488ad65c704932252b0c9228f9d (link)
#121753 Add proper cfg to keep only one AlignmentEnum definition fo… ef92630a189a45f0883ad1078bc76c91cfd2c6c0 (link)
#121782 allow statics pointing to mutable statics c02957e521c387517fe2fc5e9c84c9bb374a2cd9 (link)
#121798 Fix links in rustc doc bdf8802dc23592bcfad327b093da3d9a2382fa2d (link)
#121806 add const test for ptr::metadata 6864bc7c9382545a053fcbfcd3bb0726915d9554 (link)
#121809 Remove doc aliases to PATH 7499d6c9c2cb5638ec6d30f2a39b6462c01887c1 (link)

previous master: 878c8a2a62

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

Overall result: ❌ regressions - 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)
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

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 651.156s -> 651.937s (0.12%)
Artifact size: 311.50 MiB -> 311.55 MiB (0.01%)

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

lqd commented Mar 1, 2024

I believe this is just syn-opt returning to its usual noisiness window, that somehow was reduced for a while and is now picking back up, resulting in this false regression IMHO.

@Mark-Simulacrum Mark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Mar 5, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-mawij2g branch March 16, 2024 18:19
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. 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.