Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4aa9d23

Browse files
committed
Auto merge of #92592 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backports Backports these PRs: * Fix HashStable implementation on InferTy #91892 * Revert setting a default for the MACOSX_DEPLOYMENT_TARGET env var for linking #91870 * Make rustdoc headings black, and markdown blue #91534 * Disable LLVM newPM by default #91190 * Deduplicate projection sub-obligations #90423 * Sync portable-simd to remove autosplats #91484 by dropping portable_simd entirely (keeping the subtree, just from std/core) * Quote bat script command line #92208 * Fix failing tests #92201 (CI fix) r? `@Mark-Simulacrum`
2 parents 0e07bcb + e458615 commit 4aa9d23

File tree

28 files changed

+358
-164
lines changed

28 files changed

+358
-164
lines changed

‎compiler/rustc_codegen_llvm/src/back/write.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -395,18 +395,14 @@ fn get_pgo_sample_use_path(config: &ModuleConfig) -> Option<CString> {
395395
}
396396

397397
pub(crate) fn should_use_new_llvm_pass_manager(
398-
cgcx: &CodegenContext<LlvmCodegenBackend>,
398+
_cgcx: &CodegenContext<LlvmCodegenBackend>,
399399
config: &ModuleConfig,
400400
) -> bool {
401-
// The new pass manager is enabled by default for LLVM >= 13.
402-
// This matches Clang, which also enables it since Clang 13.
403-
404-
// FIXME: There are some perf issues with the new pass manager
405-
// when targeting s390x, so it is temporarily disabled for that
406-
// arch, see https://github.com/rust-lang/rust/issues/89609
401+
// The new pass manager is causing significant performance issues such as #91128, and is
402+
// therefore disabled in stable versions of rustc by default.
407403
config
408404
.new_llvm_pass_manager
409-
.unwrap_or_else(|| cgcx.target_arch != "s390x" && llvm_util::get_version() >= (13,0,0))
405+
.unwrap_or(false)
410406
}
411407

412408
pub(crate) unsafe fn optimize_with_new_llvm_pass_manager(

‎compiler/rustc_target/src/spec/aarch64_apple_darwin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pub fn target() -> Target {
99
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::THREAD;
1010

1111
base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-arch".to_string(), "arm64".to_string()]);
12-
base.link_env.extend(super::apple_base::macos_link_env("arm64"));
1312
base.link_env_remove.extend(super::apple_base::macos_link_env_remove());
1413

1514
// Clang automatically chooses a more specific target based on

‎compiler/rustc_target/src/spec/apple_base.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,6 @@ pub fn macos_llvm_target(arch: &str) -> String {
7979
format!("{}-apple-macosx{}.{}.0", arch, major, minor)
8080
}
8181

82-
pub fn macos_link_env(arch: &str) -> Vec<(String, String)> {
83-
// Use the default deployment target for linking just as with the LLVM target if not
84-
// specified via MACOSX_DEPLOYMENT_TARGET, otherwise the system linker would use its
85-
// default which varies with Xcode version.
86-
if env::var("MACOSX_DEPLOYMENT_TARGET").is_err() {
87-
let default = macos_default_deployment_target(arch);
88-
vec![("MACOSX_DEPLOYMENT_TARGET".to_string(), format!("{}.{}", default.0, default.1))]
89-
} else {
90-
vec![]
91-
}
92-
}
93-
9482
pub fn macos_link_env_remove() -> Vec<String> {
9583
let mut env_remove = Vec::with_capacity(2);
9684
// Remove the `SDKROOT` environment variable if it's clearly set for the wrong platform, which

‎compiler/rustc_target/src/spec/i686_apple_darwin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ pub fn target() -> Target {
55
base.cpu = "yonah".to_string();
66
base.max_atomic_width = Some(64);
77
base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m32".to_string()]);
8-
base.link_env.extend(super::apple_base::macos_link_env("i686"));
98
base.link_env_remove.extend(super::apple_base::macos_link_env_remove());
109
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
1110
base.stack_probes = StackProbeType::Call;

‎compiler/rustc_target/src/spec/x86_64_apple_darwin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ pub fn target() -> Target {
1010
LinkerFlavor::Gcc,
1111
vec!["-m64".to_string(), "-arch".to_string(), "x86_64".to_string()],
1212
);
13-
base.link_env.extend(super::apple_base::macos_link_env("x86_64"));
1413
base.link_env_remove.extend(super::apple_base::macos_link_env_remove());
1514
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
1615
base.stack_probes = StackProbeType::Call;

‎compiler/rustc_trait_selection/src/traits/project.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use super::{Normalized, NormalizedTy, ProjectionCacheEntry, ProjectionCacheKey};
2020
use crate::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
2121
use crate::infer::{InferCtxt, InferOk, LateBoundRegionConversionTime};
2222
use crate::traits::error_reporting::InferCtxtExt as _;
23+
use rustc_data_structures::sso::SsoHashSet;
2324
use rustc_data_structures::stack::ensure_sufficient_stack;
2425
use rustc_errors::ErrorReported;
2526
use rustc_hir::def_id::DefId;
@@ -944,9 +945,14 @@ fn opt_normalize_projection_type<'a, 'b, 'tcx>(
944945
Normalized { value: projected_ty, obligations: projected_obligations }
945946
};
946947

948+
let mut deduped: SsoHashSet<_> = Default::default();
947949
let mut canonical =
948950
SelectionContext::with_query_mode(selcx.infcx(), TraitQueryMode::Canonical);
951+
949952
result.obligations.drain_filter(|projected_obligation| {
953+
if !deduped.insert(projected_obligation.clone()) {
954+
return true;
955+
}
950956
// If any global obligations always apply, considering regions, then we don't
951957
// need to include them. The `is_global` check rules out inference variables,
952958
// so there's no need for the caller of `opt_normalize_projection_type`

‎compiler/rustc_type_ir/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ impl<CTX> HashStable<CTX> for FloatTy {
559559
impl<CTX> HashStable<CTX> for InferTy {
560560
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
561561
use InferTy::*;
562+
discriminant(self).hash_stable(ctx, hasher);
562563
match self {
563564
TyVar(v) => v.as_u32().hash_stable(ctx, hasher),
564565
IntVar(v) => v.index.hash_stable(ctx, hasher),

‎library/core/src/lib.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -398,27 +398,4 @@ pub mod arch {
398398
}
399399
}
400400

401-
// Pull in the `core_simd` crate directly into libcore. The contents of
402-
// `core_simd` are in a different repository: rust-lang/portable-simd.
403-
//
404-
// `core_simd` depends on libcore, but the contents of this module are
405-
// set up in such a way that directly pulling it here works such that the
406-
// crate uses this crate as its libcore.
407-
#[path = "../../portable-simd/crates/core_simd/src/mod.rs"]
408-
#[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)]
409-
#[allow(rustdoc::bare_urls)]
410-
#[unstable(feature = "portable_simd", issue = "86656")]
411-
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
412-
#[cfg(not(bootstrap))]
413-
mod core_simd;
414-
415-
#[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")]
416-
#[unstable(feature = "portable_simd", issue = "86656")]
417-
#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
418-
#[cfg(not(bootstrap))]
419-
pub mod simd {
420-
#[unstable(feature = "portable_simd", issue = "86656")]
421-
pub use crate::core_simd::simd::*;
422-
}
423-
424401
include!("primitive_docs.rs");

‎library/core/tests/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
#![feature(never_type)]
6262
#![feature(unwrap_infallible)]
6363
#![feature(result_into_ok_or_err)]
64-
#![cfg_attr(not(bootstrap), feature(portable_simd))]
6564
#![feature(ptr_metadata)]
6665
#![feature(once_cell)]
6766
#![feature(unsized_tuple_coercion)]
@@ -107,8 +106,6 @@ mod pattern;
107106
mod pin;
108107
mod ptr;
109108
mod result;
110-
#[cfg(not(bootstrap))]
111-
mod simd;
112109
mod slice;
113110
mod str;
114111
mod str_lossy;

‎library/core/tests/simd.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /