Skip to content

Rollup of 6 pull requests #132831

New issue

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

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

Already on GitHub? # to your account

Merged
merged 15 commits into from
Nov 10, 2024
Merged

Rollup of 6 pull requests #132831

merged 15 commits into from
Nov 10, 2024

Conversation

workingjubilee
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

taiki-e and others added 15 commits November 8, 2024 10:46
Also make the file have a third mode for where everything is cfg'd out to make sure it's an early error.
Co-authored-by: Jubilee <workingjubilee@gmail.com>
…nieu

Stabilize s390x inline assembly

This stabilizes inline assembly for s390x (SystemZ).

Corresponding reference PR: rust-lang/reference#1643

---

From the requirements of stabilization mentioned in rust-lang#93335

> Each architecture needs to be reviewed before stabilization:

> - It must have clobber_abi.

Done in rust-lang#130630.

> - It must be possible to clobber every register that is normally clobbered by a function call.

Done in the PR that added support for clobber_abi.

> - Generally review that the exposed register classes make sense.

The followings can be used as input/output:

- `reg` (`r[0-10]`, `r[12-14]`): General-purpose register

- `reg_addr` (`r[1-10]`, `r[12-14]`): General-purpose register except `r0` which is evaluated as zero in an address context

  This class is needed because `r0`, which may be allocated when using the `reg` class, cannot be used as a register in certain contexts. This is identical to the `a` constraint in LLVM and GCC. See rust-lang#119431 for details.

- `freg` (`f[0-15]`): Floating-point register

The followings are clobber-only:

- `vreg` (`v[0-31]`): Vector register

  Technically `vreg` should be able to accept `#[repr(simd)]` types as input/output if the unstable `vector` target feature added is enabled, but `core::arch` has no s390x vector type and both `#[repr(simd)]` and `core::simd` are unstable. Everything related is unstable, so the fact that this is currently a clobber-only should not be considered a stabilization blocker. (rust-lang#130869 tracks unstable stuff here)

- `areg` (`a[2-15]`): Access register

All of the above register classes except `reg_addr` are needed for `clobber_abi`.

The followings cannot be used as operands for inline asm (see also [getReservedRegs](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp#L258-L282) and [SystemZELFRegisters](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h#L107-L128) in LLVM):

- `r11`: frame pointer
- `r15`: stack pointer
- `a0`, `a1`: Reserved for system use
- `c[0-15]` (control register)  Reserved by the kernel

Although not listed in the above requirements, `preserves_flags` is implemented in rust-lang#111331.

---

cc ``@uweigand``

r? ``@Amanieu``

``@rustbot`` label +O-SystemZ +A-inline-assembly
interpret: get_alloc_info: also return mutability

This will be needed for rust-lang/miri#3971

This then tuned into a larger refactor where we introduce a new type for the `get_alloc_info` return data, and we move some code to methods on `GlobalAlloc` to avoid duplicating it between the validity check and `get_alloc_info`.
…r=fee1-dead,compiler-errors

require const_impl_trait gate for all conditional and trait const calls

Alternative to rust-lang#132786.

`@compiler-errors`  this is basically what I meant with my proposals. I found it's easier to express this in code than English. ;)

r? `@compiler-errors`
… r=workingjubilee

Update grammar in wasm-c-abi's compiler flag documentation

This PR adjusts the grammar of the `wasm-c-abi` compiler flag documentation. See the inline comments within the PR for details.
…bby789

Exclude relnotes-tracking-issue from needs-triage
…compiler-errors

Additional tests to ensure let is rejected during parsing

In the original stabilization PR, @ `compiler-errors` has [pointed out](rust-lang#94927 (comment)) that rust-lang#97295 wasn't enough to address the concerns about having `let` in expressions being rejected at parsing time, instead of later.

Thankfully, since then the situation has been greatly improved by rust-lang#115677. This PR adds some additional tests to `disallowed-positions.rs`, and adds two additional revisions to the "normal" case which is now given the `feature` name:

* `no_feature`: Added to incorporate `disallowed-positions-without-feature-gate.rs` into the file, reducing duplication.
* `nothing`: like feature, but all functions are cfg'd out. Ensures that the errors are really emitted during parsing.

cc tracking issue rust-lang#53667
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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. rollup A PR which is a rollup labels Nov 10, 2024
@workingjubilee
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Nov 10, 2024

📌 Commit c19d56c has been approved by workingjubilee

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 Nov 10, 2024
@bors
Copy link
Collaborator

bors commented Nov 10, 2024

⌛ Testing commit c19d56c with merge 6689597...

@bors
Copy link
Collaborator

bors commented Nov 10, 2024

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing 6689597 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 10, 2024
@bors bors merged commit 6689597 into rust-lang:master Nov 10, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 10, 2024
@workingjubilee workingjubilee deleted the rollup-6fdif44 branch November 10, 2024 08:15
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#131258 Stabilize s390x inline assembly f565cc08d0e32546a94a086f931adb03e6767dd1 (link)
#132801 interpret: get_alloc_info: also return mutability ef45597c909cffdff8c28f030dd1c1e4a38311ce (link)
#132823 require const_impl_trait gate for all conditional and trait… 5b3cf1680444bcecff935977a3b70b986cdef96e (link)
#132824 Update grammar in wasm-c-abi's compiler flag documentation 384ee40d0cd7e56705f8d273c47aa7bf3ab530f6 (link)
#132825 Exclude relnotes-tracking-issue from needs-triage ca691e6c3d5c97b238ad1cca17c2c4947c0fd1d3 (link)
#132828 Additional tests to ensure let is rejected during parsing f6978ec1285b1298f873d346b6f4beba133e7ec9 (link)

previous master: 7660aed73d

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

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

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

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.4% [1.3%, 1.5%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-1.4%, -0.2%] 13
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 3.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)
- - 0
Regressions ❌
(secondary)
3.7% [2.8%, 4.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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: 784.572s -> 785.39s (0.10%)
Artifact size: 335.21 MiB -> 335.26 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Nov 10, 2024
@Mark-Simulacrum
Copy link
Member

@rust-timer build ef45597

@rust-timer

This comment has been minimized.

mati865 pushed a commit to mati865/rust that referenced this pull request Nov 12, 2024
…kingjubilee

Rollup of 6 pull requests

Successful merges:

 - rust-lang#131258 (Stabilize s390x inline assembly)
 - rust-lang#132801 (interpret: get_alloc_info: also return mutability)
 - rust-lang#132823 (require const_impl_trait gate for all conditional and trait const calls)
 - rust-lang#132824 (Update grammar in wasm-c-abi's compiler flag documentation)
 - rust-lang#132825 (Exclude relnotes-tracking-issue from needs-triage)
 - rust-lang#132828 (Additional tests to ensure let is rejected during parsing)

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

Finished benchmarking commit (ef45597): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.5% [1.3%, 1.6%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.4%, -1.0%] 6
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.2%, secondary 3.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)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
3.0% [2.3%, 3.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Cycles

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

Binary size

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

Bootstrap: 784.572s -> 784.674s (0.01%)
Artifact size: 335.21 MiB -> 335.23 MiB (0.01%)

# for free to join this conversation on GitHub. Already have an account? # 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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants