diff options
| author | Luca Barbato <lu_zero@gentoo.org> | 2023-06-30 12:07:21 +0200 |
|---|---|---|
| committer | Luca Barbato <lu_zero@gentoo.org> | 2023-06-30 12:07:21 +0200 |
| commit | 528f11c24b2027f33ac9af63695dddfb7bd2b514 (patch) | |
| tree | 6e68c82170460ca0a2684d58a2b29c9faa2a78e4 | |
| parent | b4591cb04c8dbcd780620c1e86c8ddd0c651622a (diff) | |
| download | rust-528f11c24b2027f33ac9af63695dddfb7bd2b514.tar.gz rust-528f11c24b2027f33ac9af63695dddfb7bd2b514.zip | |
Mark wrapped intrinsics as inline(always)
This should mitigate having the inliner decide not to inline when the architecture is lacking an implementation of TargetTransformInfo::areInlineCompatible aware of the target features (e.g. PowerPC as today).
| -rw-r--r-- | library/core/src/intrinsics.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 9b8612485ac..5a9a7013a19 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2657,7 +2657,7 @@ pub(crate) fn is_nonoverlapping<T>(src: *const T, dst: *const T, count: usize) - #[stable(feature = "rust1", since = "1.0.0")] #[rustc_allowed_through_unstable_modules] #[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")] -#[inline] +#[inline(always)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) { extern "rust-intrinsic" { @@ -2748,7 +2748,7 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us #[stable(feature = "rust1", since = "1.0.0")] #[rustc_allowed_through_unstable_modules] #[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")] -#[inline] +#[inline(always)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) { extern "rust-intrinsic" { @@ -2821,7 +2821,7 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) { #[stable(feature = "rust1", since = "1.0.0")] #[rustc_allowed_through_unstable_modules] #[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")] -#[inline] +#[inline(always)] #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) { extern "rust-intrinsic" { |
