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

Bump stdarch submodule #83278

Merged
merged 1 commit into from
May 8, 2021
Merged

Bump stdarch submodule #83278

merged 1 commit into from
May 8, 2021

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Mar 18, 2021

Major changes:

  • More AVX-512 intrinsics.
  • More ARM & AArch64 NEON intrinsics.
  • Updated unstable WASM intrinsics to latest draft standards.
  • Intrinsics that previously used #[rustc_args_required_const] now use const generics. See Use const generics for stdarch intrinsics #83167 for more details.
  • std_detect is now a separate crate instead of a submodule of std.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive
Copy link
Collaborator

⚠️ Warning ⚠️

  • These commits modify submodules.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 18, 2021
@Mark-Simulacrum
Copy link
Member

@bors try @rust-timer queue

@Amanieu Amanieu marked this pull request as draft March 18, 2021 20:52
@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 18, 2021
@bors
Copy link
Contributor

bors commented Mar 18, 2021

⌛ Trying commit 56246c9462f2833f77ca259cd88dd33882f5ff9e with merge 5910a977f10dc850a8529c3d43d1c919b75ce4ca...

src/stage0.txt Outdated
date: 2021-02-14
rustc: beta
date: 2021-03-17
rustc: nightly
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to wait for the bootstrap compiler to be upgraded before we can actually merge this.

@rust-log-analyzer

This comment has been minimized.

Cargo.lock Outdated
Comment on lines 3 to 4
version = 3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In last few cargo.lock updates this part wasn't exist, maybe it should be removed until some decision on cargo.lock format version for rustc?

@bors
Copy link
Contributor

bors commented Mar 18, 2021

☀️ Try build successful - checks-actions
Build commit: 5910a977f10dc850a8529c3d43d1c919b75ce4ca (5910a977f10dc850a8529c3d43d1c919b75ce4ca)

@rust-timer
Copy link
Collaborator

Queued 5910a977f10dc850a8529c3d43d1c919b75ce4ca with parent 1705a7d, future comparison URL.

@rust-log-analyzer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (5910a977f10dc850a8529c3d43d1c919b75ce4ca): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 19, 2021
@Amanieu
Copy link
Member Author

Amanieu commented Mar 19, 2021

Looking at the perf results, it seems that the regressions mostly affect very short benchmark programs, which indicates a small fixed cost. I think this might be because std now pulls in std_detect as a separate crate instead of having it built into std, but I'm not 100% sure.

@tmiasko
Copy link
Contributor

tmiasko commented Mar 19, 2021

On x86_64 there are now 47% more intrinsics (+1588 based on -Zdump-mir=all&PreCodegen, there is also similar increase in query counts).

@Mark-Simulacrum
Copy link
Member

core's compiletime is way down though:

core 15.774 8.898 -43.6%

I suspect that this may be a minor hit for the smallest crate, but it looks like this adds 50-200ms to most crates, with higher % impact on the smaller crates as a result.

I'm inclined to say that this is overall an acceptable performance result.

@Amanieu
Copy link
Member Author

Amanieu commented Mar 25, 2021

Let's see if #[rustc_legacy_const_generics] works properly.

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-83278 created and queued.
🤖 Automatically detected try build 5910a977f10dc850a8529c3d43d1c919b75ce4ca
⚠️ Try build based on commit 1705a7d, but latest commit is 2ef230c120f5c6af800b3fb51b78b14ce01a8e63. Did you forget to make a new try build?
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 25, 2021
@jyn514
Copy link
Member

jyn514 commented Apr 2, 2021

Would it be possible in the meantime to bump stdarch to an earlier version, before rustc_legacy_const_generics was added, so I can get the changes from rust-lang/stdarch#1013 without waiting for crater? This is blocking #82539.

@Amanieu
Copy link
Member Author

Amanieu commented Apr 2, 2021

Sure, feel free to make a separate PR for that.

@bors
Copy link
Contributor

bors commented May 8, 2021

📌 Commit ac7f5ee2fea9d9536a429509ab50860a7949b4d0 has been approved by Mark-Simulacrum

@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 8, 2021
@Mark-Simulacrum
Copy link
Member

Performance results are still a bit unfortunate, but I agree with my prior claim that they're overall good -- and likely not really new, just a matter of adding (yet more) to std and friends.

@bors
Copy link
Contributor

bors commented May 8, 2021

⌛ Testing commit ac7f5ee2fea9d9536a429509ab50860a7949b4d0 with merge bce0ca13ed535e764d8e837871607c39d327a1b9...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented May 8, 2021

💔 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 May 8, 2021
@RalfJung
Copy link
Member

RalfJung commented May 8, 2021

error: formatting may not be suitable for sub-register argument
  --> library/core/src/../../stdarch/crates/core_arch/src/x86/bt.rs:11:22
   |
11 |         "btl {b:e}, ({p})",
   |                      ^^^
12 |         "setc {r}",
13 |         p = in(reg) p,
   |                     - for this argument
   |
   = note: `-D asm-sub-register` implied by `-D warnings`
   = help: use the `e` modifier to have the register formatted as `eax`
   = help: or use the `r` modifier to keep the default formatting of `rax`

@Amanieu
Copy link
Member Author

Amanieu commented May 8, 2021

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented May 8, 2021

📌 Commit bf8b15f has been approved by Mark-Simulacrum

@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 8, 2021
@bors
Copy link
Contributor

bors commented May 8, 2021

⌛ Testing commit bf8b15f with merge 881c1ac...

@bors
Copy link
Contributor

bors commented May 8, 2021

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 881c1ac to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 8, 2021
@bors bors merged commit 881c1ac into rust-lang:master May 8, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 8, 2021
@klensy
Copy link
Contributor

klensy commented May 8, 2021

@pnkfelix
Copy link
Member

visited for perf triage. There are regressions, but as noted in the immediately preceding comment, they were not as bad as anticipated. And also, we did continue to see the 2x win on compile-time for libcore.

wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Aug 12, 2021
Pkgsrc changes:
 * Bump bootstrap requirements to 1.53.0.
 * Adjust patches, adapt to upstream changes, adjust cargo checksums
 * If using an external llvm, require >= 10.0

Upsteream changes:

Version 1.54.0 (2021-07-29)
============================

Language
-----------------------

- [You can now use macros for values in built-in attribute macros.][83366]
  While a seemingly minor addition on its own, this enables a lot of
  powerful functionality when combined correctly. Most notably you can
  now include external documentation in your crate by writing the following.
  ```rust
  #![doc = include_str!("README.md")]
  ```
  You can also use this to include auto-generated modules:
  ```rust
  #[path = concat!(env!("OUT_DIR"), "/generated.rs")]
  mod generated;
  ```

- [You can now cast between unsized slice types (and types which contain
  unsized slices) in `const fn`.][85078]
- [You can now use multiple generic lifetimes with `impl Trait` where the
   lifetimes don't explicitly outlive another.][84701] In code this means
   that you can now have `impl Trait<'a, 'b>` where as before you could
   only have `impl Trait<'a, 'b> where 'b: 'a`.

Compiler
-----------------------

- [Rustc will now search for custom JSON targets in
  `/lib/rustlib/<target-triple>/target.json` where `/` is the "sysroot"
  directory.][83800] You can find your sysroot directory by running
  `rustc --print sysroot`.
- [Added `wasm` as a `target_family` for WebAssembly platforms.][84072]
- [You can now use `#[target_feature]` on safe functions when targeting
  WebAssembly platforms.][84988]
- [Improved debugger output for enums on Windows MSVC platforms.][85292]
- [Added tier 3\* support for `bpfel-unknown-none`
   and `bpfeb-unknown-none`.][79608]

\* Refer to Rust's [platform support page][platform-support-doc] for more
   information on Rust's tiered platform support.

Libraries
-----------------------

- [`panic::panic_any` will now `#[track_caller]`.][85745]
- [Added `OutOfMemory` as a variant of `io::ErrorKind`.][84744]
- [ `proc_macro::Literal` now implements `FromStr`.][84717]
- [The implementations of vendor intrinsics in core::arch have been
   significantly refactored.][83278] The main user-visible changes are
   a 50% reduction in the size of libcore.rlib and stricter validation
   of constant operands passed to intrinsics. The latter is technically
   a breaking change, but allows Rust to more closely match the C vendor
   intrinsics API.

Stabilized APIs
---------------

- [`BTreeMap::into_keys`]
- [`BTreeMap::into_values`]
- [`HashMap::into_keys`]
- [`HashMap::into_values`]
- [`arch::wasm32`]
- [`VecDeque::binary_search`]
- [`VecDeque::binary_search_by`]
- [`VecDeque::binary_search_by_key`]
- [`VecDeque::partition_point`]

Cargo
-----

- [Added the `--prune <spec>` option to `cargo-tree` to remove a package from
  the dependency graph.][cargo/9520]
- [Added the `--depth` option to `cargo-tree` to print only to a certain depth
  in the tree ][cargo/9499]
- [Added the `no-proc-macro` value to `cargo-tree --edges` to hide procedural
  macro dependencies.][cargo/9488]
- [A new environment variable named `CARGO_TARGET_TMPDIR` is
  available.][cargo/9375]
  This variable points to a directory that integration tests and
  benches can use as a "scratchpad" for testing filesystem operations.

Compatibility Notes
-------------------
- [Mixing Option and Result via `?` is no longer permitted in
  closures for inferred types.][86831]
- [Previously unsound code is no longer permitted where different
  constructors in branches could require different lifetimes.][85574]
- As previously mentioned the [`std::arch` instrinsics now uses
  stricter const checking][83278] than before and may reject some
  previously accepted code.
- [`i128` multiplication on Cortex M0+ platforms currently
  unconditionally causes overflow when compiled with `codegen-units
  = 1`.][86063]

[85574]: rust-lang/rust#85574
[86831]: rust-lang/rust#86831
[86063]: rust-lang/rust#86063
[86831]: rust-lang/rust#86831
[79608]: rust-lang/rust#79608
[84988]: rust-lang/rust#84988
[84701]: rust-lang/rust#84701
[84072]: rust-lang/rust#84072
[85745]: rust-lang/rust#85745
[84744]: rust-lang/rust#84744
[85078]: rust-lang/rust#85078
[84717]: rust-lang/rust#84717
[83800]: rust-lang/rust#83800
[83366]: rust-lang/rust#83366
[83278]: rust-lang/rust#83278
[85292]: rust-lang/rust#85292
[cargo/9520]: rust-lang/cargo#9520
[cargo/9499]: rust-lang/cargo#9499
[cargo/9488]: rust-lang/cargo#9488
[cargo/9375]: rust-lang/cargo#9375
[`BTreeMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_keys
[`BTreeMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_values
[`HashMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_keys
[`HashMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_values
[`arch::wasm32`]: https://doc.rust-lang.org/core/arch/wasm32/index.html
[`VecDeque::binary_search`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search
[`VecDeque::binary_search_by`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by
[`VecDeque::binary_search_by_key`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by_key
[`VecDeque::partition_point`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.partition_point
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.