Skip to content

Commit

Permalink
Auto merge of rust-lang#125486 - michaelwoerister:v0-baseline-240524,…
Browse files Browse the repository at this point in the history
… r=<try>

[perf] Test performance with v0 symbol mangling scheme being the default

With the wider ecosystem getting close to support the v0 mangling scheme and LLD as the default linker addressing v0's main performance issue, it is getting more likely that we can soon make v0 the default.

This PR's purpose is to collect current performance numbers and also to serve as a baseline for gauging the performance impact of [MCP 737](rust-lang/compiler-team#737).

v0 symbol mangling tracking issue: rust-lang#60705

r? `@ghost`
  • Loading branch information
bors committed May 24, 2024
2 parents 4649877 + bb6e11f commit 6d746cd
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ impl Options {
}

pub fn get_symbol_mangling_version(&self) -> SymbolManglingVersion {
self.cg.symbol_mangling_version.unwrap_or(SymbolManglingVersion::Legacy)
self.cg.symbol_mangling_version.unwrap_or(SymbolManglingVersion::V0)
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/assembly/closure-inherit-target-feature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//@ ignore-sgx Tests incompatible with LVI mitigations
//@ assembly-output: emit-asm
// make sure the feature is not enabled at compile-time
//@ compile-flags: -C opt-level=3 -C target-feature=-sse4.1 -C llvm-args=-x86-asm-syntax=intel
//@ compile-flags: -C opt-level=3 -C target-feature=-sse4.1 -C llvm-args=-x86-asm-syntax=intel -Csymbol-mangling-version=legacy -Zunstable-options

#![feature(target_feature_11)]
#![crate_type = "rlib"]
Expand Down
4 changes: 2 additions & 2 deletions tests/codegen/precondition-checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

use std::ptr::NonNull;

// CHECK-LABEL: ; core::ptr::non_null::NonNull<T>::new_unchecked
// CHECK-LABEL: ; <core::ptr::non_null::NonNull<u8>>::new_unchecked
// CHECK-NOT: call
// CHECK: }

// CHECK-LABEL: @nonnull_new
#[no_mangle]
pub unsafe fn nonnull_new(ptr: *mut u8) -> NonNull<u8> {
// CHECK: ; call core::ptr::non_null::NonNull<T>::new_unchecked
// CHECK: ; call <core::ptr::non_null::NonNull<u8>>::new_unchecked
unsafe {
NonNull::new_unchecked(ptr)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Verifies that type metadata identifiers for drop functions are emitted correctly.
//
//@ needs-sanitizer-cfi
//@ compile-flags: -Clto -Cno-prepopulate-passes -Copt-level=0 -Zsanitizer=cfi -Ctarget-feature=-crt-static
//@ compile-flags: -Clto -Cno-prepopulate-passes -Copt-level=0 -Zsanitizer=cfi -Ctarget-feature=-crt-static -Csymbol-mangling-version=legacy -Zunstable-options

#![crate_type="lib"]

Expand Down
3 changes: 2 additions & 1 deletion tests/crashes/118603.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ known-bug: #118603
//@ compile-flags: -Copt-level=0
//@ compile-flags: -Copt-level=0 -Csymbol-mangling-version=legacy
// ignore-tidy-linelength
//@ ignore-test

#![feature(generic_const_exprs)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:56:5:
debug!!!
stack backtrace:
0: std::panicking::begin_panic
0: std::panicking::begin_panic::<&str>
1: short_ice_remove_middle_frames_2::eight
2: short_ice_remove_middle_frames_2::seven::{{closure}}
2: short_ice_remove_middle_frames_2::seven::{closure#0}
[... omitted 3 frames ...]
3: short_ice_remove_middle_frames_2::fifth
4: short_ice_remove_middle_frames_2::fourth::{{closure}}
4: short_ice_remove_middle_frames_2::fourth::{closure#0}
[... omitted 4 frames ...]
5: short_ice_remove_middle_frames_2::first
6: short_ice_remove_middle_frames_2::main
7: core::ops::function::FnOnce::call_once
7: <fn() as core::ops::function::FnOnce<()>>::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
8 changes: 4 additions & 4 deletions tests/ui/panics/short-ice-remove-middle-frames.run.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:52:5:
debug!!!
stack backtrace:
0: std::panicking::begin_panic
0: std::panicking::begin_panic::<&str>
1: short_ice_remove_middle_frames::seven
2: short_ice_remove_middle_frames::sixth
3: short_ice_remove_middle_frames::fifth::{{closure}}
3: short_ice_remove_middle_frames::fifth::{closure#0}
[... omitted 4 frames ...]
4: short_ice_remove_middle_frames::second
5: short_ice_remove_middle_frames::first::{{closure}}
5: short_ice_remove_middle_frames::first::{closure#0}
6: short_ice_remove_middle_frames::first
7: short_ice_remove_middle_frames::main
8: core::ops::function::FnOnce::call_once
8: <fn() as core::ops::function::FnOnce<()>>::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

0 comments on commit 6d746cd

Please sign in to comment.