about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/abi.rs
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2023-08-26 17:42:59 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2023-08-26 17:42:59 -0700
commit754f488d46fa33387c3dca3b08d3f3ec2fe02d3f (patch)
tree0891bfc631224683cc918fe5ab976dfdba4241be /compiler/rustc_ty_utils/src/abi.rs
parent22d41ae90facbffdef9115809e8b6c1f71ebbf7c (diff)
downloadrust-754f488d46fa33387c3dca3b08d3f3ec2fe02d3f.tar.gz
rust-754f488d46fa33387c3dca3b08d3f3ec2fe02d3f.zip
Use `preserve_mostcc` for `extern "rust-cold"`
As experimentation in 115242 has shown looks better than `coldcc`.

And *don't* use a different convention for cold on Windows, because that actually ends up making things worse.

cc tracking issue 97544
Diffstat (limited to 'compiler/rustc_ty_utils/src/abi.rs')
-rw-r--r--compiler/rustc_ty_utils/src/abi.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs
index 4d0b847533b..a03da41652c 100644
--- a/compiler/rustc_ty_utils/src/abi.rs
+++ b/compiler/rustc_ty_utils/src/abi.rs
@@ -172,7 +172,10 @@ fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi) -> Conv {
     use rustc_target::spec::abi::Abi::*;
     match tcx.sess.target.adjust_abi(abi) {
         RustIntrinsic | PlatformIntrinsic | Rust | RustCall => Conv::Rust,
-        RustCold => Conv::RustCold,
+
+        // This is intentionally not using `Conv::Cold`, as that has to preserve
+        // even SIMD registers, which is generally not a good trade-off.
+        RustCold => Conv::PreserveMost,
 
         // It's the ABI's job to select this, not ours.
         System { .. } => bug!("system abi should be selected elsewhere"),