Assist JIT in eliminating bounds checks (#81036)
authorxtqqczze <45661989+xtqqczze@users.noreply.github.com>
Mon, 15 May 2023 16:17:41 +0000 (17:17 +0100)
committerGitHub <noreply@github.com>
Mon, 15 May 2023 16:17:41 +0000 (12:17 -0400)
commit6730c716bca493dcea9eee5477e05b522baf6a77
tree8a6a3c3c63ee86cda98236858194cb1762f6bc39
parent435c1d26cc363c55e9caab4561825f9719473550
Assist JIT in eliminating bounds checks (#81036)

* for \(.+!= [^ ]+\.Length

* while \(.+!= [^ ]+\.Length

* Remove additional bounds check
13 files changed:
src/coreclr/tools/Common/Compiler/ReferenceSource/LinkAttributesParser.cs
src/coreclr/tools/aot/Mono.Linker.Tests/Extensions/NiceIO.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
src/libraries/System.Collections/src/System/Collections/Generic/SortedList.cs
src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/AsynchronousChannelMergeEnumerator.cs
src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/SynchronousChannelMergeEnumerator.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/AltSvcHeaderParser.cs
src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs
src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs
src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs
src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs
src/tools/illink/test/Mono.Linker.Tests/Extensions/NiceIO.cs