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 7 pull requests #115469

Merged
merged 17 commits into from
Sep 2, 2023
Merged

Rollup of 7 pull requests #115469

merged 17 commits into from
Sep 2, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Alex Zepeda and others added 17 commits August 1, 2023 15:54
On native builds `llvm-config` picks up `zlib` and this gets pased into
the rust build tools, but on cross builds `llvm-config` is explicitly
ignored as it contains information for the host system and cannot be
trusted to be accurate for the target system.

Both DragonFly and Solaris contain `zlib` in the base system, so this is
both a safe assumption and required for a successful cross build unless
`zlib` support is disabled in LLVM.

This is more or less in the same vein as rust-lang#75713 and rust-lang#75655.
As far as I know, this is always true already, but it's not in the text of the Option module docs, so I figured I'd bring this up to FCP it.
…-libz, r=cuviper

rustc_llvm: Link to `zlib` on dragonfly and solaris

On native builds `llvm-config` picks up `zlib` and this gets pased into
the rust build tools, but on cross builds `llvm-config` is explicitly
ignored as it contains information for the host system and cannot be
trusted to be accurate for the target system.

Both DragonFly and Solaris contain `zlib` in the base system, so this is
both a safe assumption and required for a successful cross build unless
`zlib` support is disabled in LLVM.

This is more or less in the same vein as rust-lang#75713 and rust-lang#75655.
Add alignment to the NPO guarantee

This PR [changes](rust-lang#114845 (comment)) "same size" to "same size and alignment" in the option module's null pointer optimization docs in <https://doc.rust-lang.org/std/option/#representation>.

As far as I know, this has been true for a long time in the actual rustc implementation, but it's not in the text of those docs, so I figured I'd bring this up to FCP it.

I also see no particular reason that we'd ever *want* to have higher alignment on these.  In many of the cases it's impossible, as the minimum alignment is already the size of the type, but even if we *could* do things like on 32-bit we could say that `NonZeroU64` is 4-align but `Option<NonZeroU64>` is 8-align, I just don't see any value in doing that, so feel completely fine closing this door for the few things on which the NPO is already guaranteed.  These are basically all primitives, and should end up with the same size & alignment as those primitives.

(There's no layout guarantee for something like `Option<[u8; 3]>`, where it'd be at least plausible to consider raising the alignment from 1 to 4 on, say, some hypothetical target that doesn't have efficient unaligned 4-byte load/stores.  And even if we ever did start to offer some kind of guarantee around such a type, I doubt we'd put it under the "null pointer" optimization header.)

Screenshots for the new examples:
![image](https://github.com/rust-lang/rust/assets/18526288/a7dbff42-50b4-462e-9e27-00d511b58763)
![image](https://github.com/rust-lang/rust/assets/18526288/dfd55288-80fb-419a-bc11-26198c27f9f9)
…upted, r=cuviper

kmc-solid: Fix `is_interrupted`

Follow-up to rust-lang#115228. Fixes a build error in [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets.

```
error[E0603]: function `is_interrupted` is private
  --> library\std\src\sys\solid\mod.rs:77:12
   |
77 |     error::is_interrupted(code)
   |            ^^^^^^^^^^^^^^ private function
   |
note: the function `is_interrupted` is defined here
  --> library\std\src\sys\solid\error.rs:35:1
   |
35 | fn is_interrupted(er: abi::ER) -> bool {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
feat(std): Stabilize 'os_str_bytes' feature

Closes rust-lang#111544
Create a SMIR visitor

r? ``@spastorino``

Doesn't have tests or examples yet, but I think we could land it and implement it for the rest of the types.
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself O-solid Operating System: SOLID O-unix Operating system: Unix-like O-windows Operating system: Windows 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-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Sep 2, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Sep 2, 2023

📌 Commit 6fca6a3 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 Sep 2, 2023
@bors
Copy link
Contributor

bors commented Sep 2, 2023

⌛ Testing commit 6fca6a3 with merge ad8f601...

@bors
Copy link
Contributor

bors commented Sep 2, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 2, 2023
@bors bors merged commit ad8f601 into rust-lang:master Sep 2, 2023
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 2, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#114349 rustc_llvm: Link to zlib on dragonfly and solaris 655f3cdab56c7aaa98b2c0ea31f0d14002fe787a (link)
#114845 Add alignment to the NPO guarantee e3d6b1273464f06edc95bee79c4f4efe28e64d80 (link)
#115427 kmc-solid: Fix is_interrupted db89a3fc4684093f6a90cd5605638a84db3cbdd8 (link)
#115443 feat(std): Stabilize 'os_str_bytes' feature 5606c07d392e57f425976bd9faf8fd2b98d2d034 (link)
#115444 Create a SMIR visitor 8654c05df891bab970bb3c073df1950a5bb2d850 (link)
#115449 Const-stabilize is_ascii 8220d6944c17db1dbbfca4b3403f4e6bd2ef9c97 (link)
#115456 Add spastorino on vacation 8e8bda46da77b50aec129216257fc03aa15bf6de (link)

previous master: 1fb6947abc

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

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

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)
2.0% [1.4%, 2.8%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-0.8%, -0.8%] 1
Improvements ✅
(secondary)
-2.4% [-2.4%, -2.4%] 1
All ❌✅ (primary) 1.4% [-0.8%, 2.8%] 5

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: 627.894s -> 628.825s (0.15%)
Artifact size: 316.38 MiB -> 316.55 MiB (0.05%)

@matthiaskrgr matthiaskrgr deleted the rollup-25ybx39 branch March 16, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself merged-by-bors This PR was explicitly merged by bors. O-solid Operating System: SOLID O-unix Operating system: Unix-like O-windows Operating system: Windows 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-libs Relevant to the library 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