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 6 pull requests #125144

Merged
merged 16 commits into from
May 15, 2024
Merged

Rollup of 6 pull requests #125144

merged 16 commits into from
May 15, 2024

Conversation

fmease
Copy link
Member

@fmease fmease commented May 15, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

reitermarkus and others added 16 commits May 8, 2024 21:52
In case the source is not in the same filesystem.
…t-inline, r=joboet

Optimize character escaping.

Allow optimization of panicking branch in `EscapeDebug`, see rust-lang#121805.

r? `@joboet`
Use an helper to move the files

In case the source is not in the same filesystem.

See openwrt/packages@c1b3e04#commitcomment-141886468
…eyouxu

Migrate `run-make/c-link-to-rust-staticlib` to `rmake`

Part of rust-lang#121876.

r? `@jieyouxu`
Invert comparison in `uN::checked_sub`

After rust-lang#124114, LLVM no longer combines the comparison and subtraction in `uN::checked_sub` when either operand is a constant (demo: https://rust.godbolt.org/z/MaeoYbsP1). The difference is more pronounced when the expression is slightly more complex (https://rust.godbolt.org/z/4rPavsYdc).

This is due to the use of `>=` here:

https://github.com/rust-lang/rust/blob/ee97564e3a9f9ac8c65103abb37c6aa48d95bfa2/library/core/src/num/uint_macros.rs#L581-L593

For constant `C`, LLVM eagerly converts `a >= C` into `a > C - 1`, but the backend can only combine `a < C` with `a - C`, not `C - 1 < a` and `a - C`: https://github.com/llvm/llvm-project/blob/e586556e375fc5c4f7e76b5c299cb981f2016108/llvm/lib/CodeGen/CodeGenPrepare.cpp#L1697-L1742

This PR[^1] simply inverts the `>=` into `<` to restore the LLVM magic, and somewhat align this with the implementation of `uN::overflowing_sub` from rust-lang#103299.

When the result is stored as an `Option` (rather than being branched/cmoved on), the discriminant is `self >= rhs`. This PR doesn't affect the codegen (and relevant tests) of that since LLVM will negate `self < rhs` to `self >= rhs` when necessary.

[^1]: Note to `self`: My very first contribution to publicly-used code. Hopefully like what I should learn to always be, tiny and humble.
Migrate `run-make/no-cdylib-as-rdylib` to `rmake`

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).

> "the test will fail if the cdylib is picked, because it doesn't export any rust symbols"

Is that true? Is there a way to verify?

I suggest maybe extending the test with: (after cleaning the directory)

```rust
    rustc()
        .input("bar.rs")
        .crate_type("cdylib")
        .run();
    rustc()
        .input("foo.rs")
        .prefer_dynamic()
        .run();
    fail();
```

to make sure we're actually testing something here.
MIR operators: clarify Shl/Shr handling of negative offsets

"made unsigned" was not fully clear (made unsigned how? by using `abs`? no), so let's say "re-interpreted as an unsigned value of the same size" instead.

r? `@scottmcm`
@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. rollup A PR which is a rollup labels May 15, 2024
@fmease
Copy link
Member Author

fmease commented May 15, 2024

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented May 15, 2024

📌 Commit 8d38f2f has been approved by fmease

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

bors commented May 15, 2024

⌛ Testing commit 8d38f2f with merge ade234d...

@bors
Copy link
Contributor

bors commented May 15, 2024

☀️ Test successful - checks-actions
Approved by: fmease
Pushing ade234d to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#124307 Optimize character escaping. 8c4b3c78b70cbd82040f74415ce438d21a0f13b1 (link)
#124975 Use an helper to move the files e2144d318425632673f2f59701d930d405f52d51 (link)
#125027 Migrate run-make/c-link-to-rust-staticlib to rmake e62142188b15836941eff6f235fc20955f7804d7 (link)
#125038 Invert comparison in uN::checked_sub 966a39b7cf626f8416538e1092246423d8e82320 (link)
#125104 Migrate run-make/no-cdylib-as-rdylib to rmake a2164c09ac52c6a68607893d5985f54dc59de02d (link)
#125137 MIR operators: clarify Shl/Shr handling of negative offsets 0ccf6eae9bfb69fae93aeded0cb28d78f912e85d (link)

previous master: 3cb0030fe9

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

@fmease fmease deleted the rollup-4uft293 branch May 15, 2024 15:00
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ade234d): 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)
0.5% [0.2%, 1.2%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.2%, 1.2%] 3

Max RSS (memory usage)

Results (primary 0.2%)

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.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-2.9%, 3.3%] 2

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.1% [0.1%, 0.1%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.4%, -0.1%] 7
Improvements ✅
(secondary)
-0.1% [-0.4%, -0.1%] 37
All ❌✅ (primary) -0.1% [-0.4%, 0.1%] 11

Bootstrap: 679.399s -> 678.357s (-0.15%)
Artifact size: 316.22 MiB -> 316.14 MiB (-0.03%)

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

Kobzol commented May 15, 2024

Small binary size win, perhaps from #124307. Not sure where the small regression comes from though, looks genuine.

@rust-timer build 8c4b3c7

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8c4b3c7): comparison URL.

Overall result: ❌ regressions - 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.5% [0.2%, 1.2%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.2%, 1.2%] 3

Max RSS (memory usage)

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

Cycles

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

Binary size

Results (primary 0.0%, 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.1% [0.1%, 0.1%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 4
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 34
All ❌✅ (primary) 0.0% [-0.1%, 0.1%] 8

Bootstrap: 679.399s -> 678.68s (-0.11%)
Artifact size: 316.22 MiB -> 316.19 MiB (-0.01%)

celinval added a commit to celinval/rust-dev that referenced this pull request Jun 4, 2024
Update Rust toolchain from nightly-2024-05-15 to nightly-2024-05-16
without any other source changes.
This is an automatically generated pull request. If any of the CI checks
fail, manual intervention is required. In such a case, review the
changes at https://github.com/rust-lang/rust from
rust-lang@8387315
up to
rust-lang@1871252.
The log for this commit range is:
rust-lang@1871252fc8 Auto merge of
rust-lang#125164 - fmease:rollup-s5vwzlg, r=fmease
rust-lang@734a109998 Rollup merge of
rust-lang#125159 - fmease:allow-unauth-labels-l-pg-z, r=jieyouxu
rust-lang@601e5d199f Rollup merge of
rust-lang#125154 - FractalFir:fnabi_doc, r=compiler-errors
rust-lang@09156291e5 Rollup merge of
rust-lang#125146 - Oneirical:panic-impl, r=jieyouxu
rust-lang@80f991e09b Rollup merge of
rust-lang#125142 - GuillaumeGomez:migrate-rustdoc-themes, r=jieyouxu
rust-lang@c5b17ec9d2 Rollup merge of
rust-lang#125003 - RalfJung:aligned_alloc, r=cuviper
rust-lang@257d222e4b Improved the
documentation of the FnAbi struct
rust-lang@72a48fc68c Allow
unauthenticated users to modify `L-*`, `PG-*` and `-Z*` labels
rust-lang@b21b74b5e6 Auto merge of
rust-lang#125134 - compiler-errors:negative-traits-are-not-notable, r=fmease
rust-lang@a7484d2e49 fix tidy
rust-lang@cae17ff42b rewrite
panic-impl-transitive
rust-lang@ade234d574 Auto merge of
rust-lang#125144 - fmease:rollup-4uft293, r=fmease
rust-lang@8d38f2fb11 Rollup merge of
rust-lang#125137 - RalfJung:mir-sh, r=scottmcm
rust-lang@2659ff3882 Rollup merge of
rust-lang#125104 - Oneirical:test6, r=jieyouxu
rust-lang@4f7d9d4ad8 Rollup merge of
rust-lang#125038 - ivan-shrimp:checked_sub, r=joboet
rust-lang@2804d4223b Rollup merge of
rust-lang#125027 - Oneirical:c-test-with-remove, r=jieyouxu
rust-lang@2e70bea168 Rollup merge of
rust-lang#124975 - lu-zero:move_file, r=clubby789
rust-lang@3873a74f8a Rollup merge of
rust-lang#124307 - reitermarkus:escape-debug-size-hint-inline, r=joboet
rust-lang@3cb0030fe9 Auto merge of
rust-lang#123413 - petrochenkov:delegmulti2, r=fmease
rust-lang@c765480efe Migrate
`run-make/rustdoc-themes` to new rmake
rust-lang@c87ae947eb Add new `htmldocck`
function to `run-make-support`
rust-lang@a71c3ffce9 Auto merge of
rust-lang#125032 - compiler-errors:crash-dump-dir, r=onur-ozkan
rust-lang@0afd50e852 MIR operators:
clarify Shl/Shr handling of negative offsets
rust-lang@44fa5fd39a Auto merge of
rust-lang#125136 - matthiaskrgr:rollup-ljm15m3, r=matthiaskrgr
rust-lang@5f1a120ee5 Rollup merge of
rust-lang#125135 - chenyukang:yukang-fix-116502, r=compiler-errors
rust-lang@f7c2934420 Rollup merge of
rust-lang#125132 - mejrs:diag, r=compiler-errors
rust-lang@a8ff937b07 Rollup merge of
rust-lang#125108 - Zalathar:info-bitmap-bytes, r=nnethercote
rust-lang@03ff673dcc Rollup merge of
rust-lang#124990 - fmease:expand-weak-aliases-within-cts, r=compiler-errors
rust-lang@75895f59b0 Fix the dedup error
because of spans from suggestion
rust-lang@9e7aff7945 Auto merge of
rust-lang#125031 - Oneirical:dynamic-libs, r=jieyouxu
rust-lang@8994840f7e rustdoc: Negative
impls are not notable
rust-lang@91a3f04a3f fix the test
rust-lang@0160bff4b1 Auto merge of
rust-lang#125084 - Jules-Bertholet:fix-125058, r=Nadrieril
rust-lang@c30b41012d delegation:
Implement list delegation
rust-lang@18d7411719 Add
`on_unimplemented" typo suggestions
rust-lang@81f7e54962 Port issue-11908 to
rmake
rust-lang@1f61cc3078 port
no-cdylib-as-rdylib test
rust-lang@b1e5e5161a remove cxx_flags
rust-lang@1f5837ae25 rewrite
c-link-to-rust-staticlib
rust-lang@5cc020d3df avoid using
aligned_alloc; posix_memalign is better-behaved
rust-lang@c81be68fb4 coverage: Remove
confusing comments from `CoverageKind`
rust-lang@bfadc3a9b9 coverage:
`CoverageIdsInfo::mcdc_bitmap_bytes` is never needed
rust-lang@fe8f66e4bc `rustc_hir_typeck`:
Account for `skipped_ref_pats` in `expr_use_visitor`
rust-lang@4db00fe229 Use an helper to
move the files
rust-lang@7fde7308bf reverse condition in
`uN::checked_sub`
rust-lang@848f3c2c6e Make crashes dump
mir to build dir
rust-lang@35a5be2833 Also expand weak
alias tys inside consts inside `expand_weak_alias_tys`
rust-lang@4edf12d33e Improve escape
methods.
rust-lang@16981ba406 Avoid panicking
branch in `EscapeIterInner`.
rust-lang@e3fc97be2b Inline
`EscapeDebug::size_hint`.

Co-authored-by: celinval <35149715+celinval@users.noreply.github.com>
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants