-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #32209
Rollup of 8 pull requests #32209
Conversation
Manishearth
commented
Mar 12, 2016
- Successful merges: std: Fix tracking issues and clean deprecated APIs #32112, cleanups and fixes for #[derive] #32139, Add AVX broadcast and conversion intrinsics #32140, Fix name resolution in lexical scopes #32141, rustdoc: improve crate-local inlining #32142, Do not report errors from regionck if other errors were already reported #32164, Removed integer suffixes in libsyntax crate #32179, Statically link run-pass/command-before-exec so it passes not just whenever we happen to bootstrap perfectly. #32193
- Failed merges: Call str::to_owned in String::from and uninline it #32182
This defines `_mm256_broadcast_ps` and `_mm256_broadcast_pd`. The `_ss` and `_sd` variants are not supported by LLVM. In Clang these intrinsics are implemented as inline functions in C++. Intel reference: https://software.intel.com/en-us/node/514144. Note: the argument type should really be "0hPc" (a pointer to a vector of half the width), but internally the LLVM intrinsic takes a pointer to a signed integer, and for any other type LLVM will complain. This means that a transmute is required to call these intrinsics. The AVX2 broadcast intrinsics `_mm256_broadcastss_ps` and `_mm256_broadcastsd_pd` are not available as LLVM intrinsics. In Clang they are implemented using the shufflevector builtin.
This defines the following intrinsics: * `_mm256_cvtepi32_pd` * `_mm256_cvtepi32_ps` * `_mm256_cvtpd_epi32` * `_mm256_cvtpd_ps` * `_mm256_cvtps_epi32` * `_mm256_cvtps_pd` * `_mm256_cvttpd_epi32` * `_mm256_cvttps_epi32` Intel reference: https://software.intel.com/en-us/node/514130.
The exact command used was: $ cd src/etc/platform-intrinsics/x86 $ python2 ../generator.py --format compiler-defs -i info.json \ sse.json sse2.json sse3.json ssse3.json sse41.json sse42.json \ avx.json avx2.json fma.json \ > ../../../librustc_platform_intrinsics/x86.rs
reported during the lifetime of this inferencer. Fixes rust-lang#30580.
It was originally intended to be i32, but it isn't. Fixes rust-lang#31886.
This is the same approach taken in rust-lang#24270, except that this should not be a breaking change because it only changes the output of hash functions, which nobody should be relying on.
This replaces some `if`s with `match`es. This was originally not possible because using a global path in a match statement caused a "non-constant path in constant expr" ICE. The issue is long since closed, though you still hit it (as an error now, not an ICE) if you try to generate match patterns using pat_lit(expr_path). But it works when constructing the patterns more carefully.
This changes local variable names in all derives to remove leading double-underscores. As far as I can tell, this doesn't break anything because there is no user code in these generated functions except for struct, field and type parameter names, and this doesn't cause shadowing of those. But I am still a bit nervous.
When deriving Hash, RustcEncodable and RustcDecodable, the syntax extension needs a type parameter to use in the inner method. They used to use __H, __S and __D respectively. If this conflicts with a type parameter already declared for the item, bad times result (see the test). There is no hygiene for type parameters, but this commit introduces a better heuristic by concatenating the names of all extant type parameters (and prepending __H).
@bors r+ p=20 |
📌 Commit f4aecf4 has been approved by |
⌛ Testing commit f4aecf4 with merge 9dd580b... |
💔 Test failed - auto-win-msvc-32-opt |
@bors r+ force |
📌 Commit 34278fa has been approved by |
⌛ Testing commit 34278fa with merge c81f9d9... |
💔 Test failed - auto-win-msvc-32-opt |
cleanups and fixes for #[derive] This contains a bunch of little cleanups and fixes to `#[derive]`. There are more extensive comments on each individual commit. - hygiene cleanups - use `discriminant_value` instead of variant index in `#[derive(Hash)]` - ~~don't move out of borrowed content in `#[derive(PartialOrd, PartialEq)]`~~ - use `intrinsics::unreachable()` instead of `unreachable!()` I don't believe there are any breaking changes in here, but I do want some more eyes on that. Fixes rust-lang#2810 (!), I believe (we still assume that "std" or "core" is the standard library but so does the rest of rustc...). Fixes rust-lang#21714 (cc @apasel422). ~~Fixes~~ (postponed) rust-lang#24047 (cc @withoutboats @bluss). Fixes rust-lang#31714 (cc @alexcrichton @bluss). Fixes rust-lang#31886 (cc @oli-obk).
…hton Add AVX broadcast and conversion intrinsics This adds the following intrinsics: * `_mm256_broadcast_pd` * `_mm256_broadcast_ps` * `_mm256_cvtepi32_pd` * `_mm256_cvtepi32_ps` * `_mm256_cvtpd_epi32` * `_mm256_cvtpd_ps` * `_mm256_cvtps_epi32` * `_mm256_cvtps_pd` * `_mm256_cvttpd_epi32` * `_mm256_cvttps_epi32` The "avx" codegen feature must be enabled to use these.
…_scopes, r=nikomatsakis Fix name resolution in lexical scopes Currently, `resolve_item_in_lexical_scope` does not check the "ribs" (type parameters and local variables). This can allow items that should be shadowed by type parameters to be named. For example, ```rust struct T { i: i32 } fn f<T>() { let t = T { i: 0 }; // This use of `T` resolves to the struct, not the type parameter } mod Foo { pub fn f() {} } fn g<Foo>() { Foo::f(); // This use of `Foo` resolves to the module, not the type parameter } ``` This PR changes `resolve_item_in_lexical_scope` so that it fails when the item is shadowed by a rib (fixes rust-lang#32120). This is a [breaking-change], but it looks unlikely to cause breakage in practice. r? @nikomatsakis
…excrichton rustdoc: improve crate-local inlining fixes rust-lang#28537 r? @alexcrichton
Do not report errors from regionck if other errors were already reported Do not report errors from regionck if other errors were already reported during the lifetime of this inferencer. Fixes rust-lang#30580. r? @arielb1
…steveklabnik Removed integer suffixes in libsyntax crate
@bors r+ force |
📌 Commit c0d0f8f has been approved by |
@bors force |
⌛ Testing commit c0d0f8f with merge c61d348... |
💔 Test failed - auto-mac-32-opt |
@bors r+ force |
📌 Commit bd5aff4 has been approved by |
⌛ Testing commit bd5aff4 with merge 5c59b51... |
💔 Test failed - auto-mac-32-opt |