From: Egor Bogatov Date: Tue, 8 Aug 2023 13:16:10 +0000 (+0200) Subject: Mark XxHash64.Complete as noinline (#90142) X-Git-Tag: accepted/tizen/unified/riscv/20231226.055536~453 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bcf9938de71a6b75edc43eb2bf97b193311d2aac;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Mark XxHash64.Complete as noinline (#90142) --- diff --git a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash64.State.cs b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash64.State.cs index efd3215..9462928 100644 --- a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash64.State.cs +++ b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash64.State.cs @@ -97,6 +97,10 @@ namespace System.IO.Hashing return acc; } + // Inliner may decide to inline this method into HashToUInt64() with help of PGO and + // can run out of "time budget" producing non-inlined simple calls such as Span.Slice. + // TODO: Remove NoInlining when https://github.com/dotnet/runtime/issues/85531 is fixed. + [MethodImpl(MethodImplOptions.NoInlining)] internal readonly ulong Complete(long length, ReadOnlySpan remaining) { ulong acc = _hadFullStripe ? Converge() : _smallAcc;