diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index eafe55366b8c9..3ae6be98cda1c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -292,21 +292,21 @@ https://github.com/dotnet/arcade cb54ca21431ee8d96f91abfbc42237bcb001f9d1 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 103c1eaca9ad80cdd1746abfb97c7f3c9d0b0f3b + f9ae5c9fda841a26d8eaaa07151ac2618725da87 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 103c1eaca9ad80cdd1746abfb97c7f3c9d0b0f3b + f9ae5c9fda841a26d8eaaa07151ac2618725da87 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 103c1eaca9ad80cdd1746abfb97c7f3c9d0b0f3b + f9ae5c9fda841a26d8eaaa07151ac2618725da87 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 103c1eaca9ad80cdd1746abfb97c7f3c9d0b0f3b + f9ae5c9fda841a26d8eaaa07151ac2618725da87 https://github.com/dotnet/hotreload-utils @@ -340,13 +340,13 @@ https://github.com/dotnet/sdk 2fd62c3936f5336b836f6b12df170aa0e90da767 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 103c1eaca9ad80cdd1746abfb97c7f3c9d0b0f3b + f9ae5c9fda841a26d8eaaa07151ac2618725da87 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 103c1eaca9ad80cdd1746abfb97c7f3c9d0b0f3b + f9ae5c9fda841a26d8eaaa07151ac2618725da87 diff --git a/eng/Versions.props b/eng/Versions.props index f8940b01835a1..0d7dad51197db 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -158,12 +158,12 @@ 8.0.0-beta.23179.4 8.0.0-beta.23179.4 - 1.0.0-prerelease.23175.4 - 1.0.0-prerelease.23175.4 - 1.0.0-prerelease.23175.4 - 1.0.0-prerelease.23175.4 - 1.0.0-prerelease.23175.4 - 1.0.0-prerelease.23175.4 + 1.0.0-prerelease.23220.15 + 1.0.0-prerelease.23220.15 + 1.0.0-prerelease.23220.15 + 1.0.0-prerelease.23220.15 + 1.0.0-prerelease.23220.15 + 1.0.0-prerelease.23220.15 16.11.23-beta1.23063.1 2.0.0-beta4.22564.1 diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems index dd7e20bf1f2d5..f6c2b81e5a401 100644 --- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems +++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems @@ -749,6 +749,7 @@ + diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Decoder.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Decoder.cs index cc239d1a5e981..2899c7d1021bf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Decoder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Decoder.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Intrinsics; @@ -350,6 +351,7 @@ public static unsafe OperationStatus DecodeFromUtf8InPlace(Span buffer, ou } } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe void Avx2Decode(ref byte* srcBytes, ref byte* destBytes, byte* srcEnd, int sourceLength, int destLength, byte* srcStart, byte* destStart) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Encoder.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Encoder.cs index 9a5ff88eb583f..83fe75aef335d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Encoder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Encoder.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Intrinsics; @@ -225,6 +226,7 @@ public static unsafe OperationStatus EncodeToUtf8InPlace(Span buffer, int } } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe void Avx2Encode(ref byte* srcBytes, ref byte* destBytes, byte* srcEnd, int sourceLength, int destLength, byte* srcStart, byte* destStart) { diff --git a/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/IndexOfAnyAsciiSearcher.cs b/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/IndexOfAnyAsciiSearcher.cs index c39639d24f826..ce0d0bd5be94b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/IndexOfAnyAsciiSearcher.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/IndexOfAnyAsciiSearcher.cs @@ -1,8 +1,9 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; using System.Numerics; +using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.Arm; @@ -869,6 +870,7 @@ private static Vector128 IndexOfAnyLookupCore(Vector128 source, Vect return result; } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static Vector256 IndexOfAnyLookup(Vector256 source0, Vector256 source1, Vector256 bitmapLookup) where TNegator : struct, INegator @@ -889,6 +891,7 @@ private static Vector256 IndexOfAnyLookup(Vector return TNegator.NegateIfNeeded(result); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static Vector256 IndexOfAnyLookupCore(Vector256 source, Vector256 bitmapLookup) { @@ -922,6 +925,7 @@ private static Vector128 IndexOfAnyLookup(Vector128 source return TNegator.NegateIfNeeded(result); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static Vector256 IndexOfAnyLookup(Vector256 source, Vector256 bitmapLookup0, Vector256 bitmapLookup1) where TNegator : struct, INegator @@ -992,6 +996,7 @@ private static unsafe int ComputeLastIndexOverlapped(ref T searchSp return offsetInVector - Vector128.Count + (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref secondVector) / (nuint)sizeof(T)); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe int ComputeFirstIndex(ref T searchSpace, ref T current, Vector256 result) where TNegator : struct, INegator @@ -1007,6 +1012,7 @@ private static unsafe int ComputeFirstIndex(ref T searchSpace, ref return offsetInVector + (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref current) / (nuint)sizeof(T)); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe int ComputeFirstIndexOverlapped(ref T searchSpace, ref T current0, ref T current1, Vector256 result) where TNegator : struct, INegator @@ -1028,6 +1034,7 @@ private static unsafe int ComputeFirstIndexOverlapped(ref T searchS return offsetInVector + (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref current0) / (nuint)sizeof(T)); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe int ComputeLastIndex(ref T searchSpace, ref T current, Vector256 result) where TNegator : struct, INegator @@ -1043,6 +1050,7 @@ private static unsafe int ComputeLastIndex(ref T searchSpace, ref T return offsetInVector + (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref current) / (nuint)sizeof(T)); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe int ComputeLastIndexOverlapped(ref T searchSpace, ref T secondVector, Vector256 result) where TNegator : struct, INegator @@ -1064,6 +1072,7 @@ private static unsafe int ComputeLastIndexOverlapped(ref T searchSp return offsetInVector - Vector256.Count + (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref secondVector) / (nuint)sizeof(T)); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static Vector256 FixUpPackedVector256Result(Vector256 result) { diff --git a/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/ProbabilisticMap.cs b/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/ProbabilisticMap.cs index 493398929f169..0a8927121f9c9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/ProbabilisticMap.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IndexOfAnyValues/ProbabilisticMap.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using System.Numerics; +using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Intrinsics; @@ -104,6 +105,7 @@ ref Unsafe.As(ref MemoryMarshal.GetReference(values)), (short)ch, values.Length); + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static Vector256 ContainsMask32CharsAvx2(Vector256 charMapLower, Vector256 charMapUpper, ref char searchSpace) { @@ -124,6 +126,7 @@ private static Vector256 ContainsMask32CharsAvx2(Vector256 charMapLo return resultLower & resultUpper; } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static Vector256 IsCharBitSetAvx2(Vector256 charMapLower, Vector256 charMapUpper, Vector256 values) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/BypassReadyToRunAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/BypassReadyToRunAttribute.cs new file mode 100644 index 0000000000000..d4def4f9eadb8 --- /dev/null +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/BypassReadyToRunAttribute.cs @@ -0,0 +1,10 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace System.Runtime +{ + [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)] + internal sealed class BypassReadyToRunAttribute : Attribute + { + } +} diff --git a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Packed.cs b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Packed.cs index 6da69bb7ebe63..c48622ca29355 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Packed.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Packed.cs @@ -4,6 +4,7 @@ using System.Buffers.Binary; using System.Diagnostics; using System.Numerics; +using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.X86; @@ -784,6 +785,7 @@ private static int IndexOfAnyInRange(ref short searchSpace, short lowI return -1; } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static Vector256 PackSources(Vector256 source0, Vector256 source1) { @@ -824,6 +826,7 @@ private static int ComputeFirstIndex(ref short searchSpace, ref short current, V return index + (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref current) / sizeof(short)); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static int ComputeFirstIndex(ref short searchSpace, ref short current, Vector256 equals) { @@ -846,6 +849,7 @@ private static int ComputeFirstIndexOverlapped(ref short searchSpace, ref short return offsetInVector + (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref current0) / sizeof(short)); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static int ComputeFirstIndexOverlapped(ref short searchSpace, ref short current0, ref short current1, Vector256 equals) { @@ -860,6 +864,7 @@ private static int ComputeFirstIndexOverlapped(ref short searchSpace, ref short return offsetInVector + (int)((nuint)Unsafe.ByteOffset(ref searchSpace, ref current0) / sizeof(short)); } + [BypassReadyToRun] [MethodImpl(MethodImplOptions.AggressiveInlining)] private static Vector256 FixUpPackedVector256Result(Vector256 result) {