Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: limited version of forward substitution for some relops #61023

Merged
merged 5 commits into from
Nov 3, 2021

Conversation

AndyAyersMS
Copy link
Member

Add a new optimization to redundant branch opts that looks at prior statements
in the same block for redundant relop trees. If one is found, we check to see
if it can be forward-substituted down to the terminal jump tree. And if it can
we duplicate the computation down at the jump.

This removes many of the cases we see in our generated code where we materialize
a boolean value in a register and then immedately test that register to see if
it is true/false, and then use that second test to drive branching -- instead we
now use the initial test logic to drive the jump and so the boolean value only
exists in the flags.

Add a new optimization to redundant branch opts that looks at prior statements
in the same block for redundant relop trees. If one is found, we check to see
if it can be forward-substituted down to the terminal jump tree. And if it can
we duplicate the computation down at the jump.

This removes many of the cases we see in our generated code where we materialize
a boolean value in a register and then immedately test that register to see if
it is true/false, and then use that second test to drive branching -- instead we
now use the initial test logic to drive the jump and so the boolean value only
exists in the flags.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 29, 2021
@ghost
Copy link

ghost commented Oct 29, 2021

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

Add a new optimization to redundant branch opts that looks at prior statements
in the same block for redundant relop trees. If one is found, we check to see
if it can be forward-substituted down to the terminal jump tree. And if it can
we duplicate the computation down at the jump.

This removes many of the cases we see in our generated code where we materialize
a boolean value in a register and then immedately test that register to see if
it is true/false, and then use that second test to drive branching -- instead we
now use the initial test logic to drive the jump and so the boolean value only
exists in the flags.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

cc @dotnet/jit-contrib

This gets rid of many cases like the following

;; Assembly listing for method Microsoft.CodeAnalysis.CSharp.SyntaxFacts:IsKeywordKind(ushort):bool

;; before

G_M47757_IG03:        ; gcrefRegs=00000000 {}, byrefRegs=00000000 {}, byref, isz
       cmp      ecx, 0x20C0
       setle    al
       movzx    rax, al
       test     eax, eax
       je       SHORT G_M47757_IG05
       mov      eax, 1

;; after

G_M47757_IG03:        ; gcrefRegs=00000000 {}, byrefRegs=00000000 {}, byref, isz
       cmp      ecx, 0x20C0
       jg       SHORT G_M47757_IG05
       mov      eax, 1

and some "reverse" cases like

;; Assembly listing for method System.Runtime.CompilerServices.DefaultInterpolatedStringHandler:AppendFormatted(double,System.String):this

;; before 

G_M58045_IG06:        ; gcrefRegs=00000080 {rdi}, byrefRegs=00000040 {rsi}, byref, isz
       movsd    qword ptr [rsp+50H], xmm6
       lea      rcx, bword ptr [rsi+24]
       ; byrRegs +[rcx]
       mov      ebx, dword ptr [rsi+16]
       mov      ebp, dword ptr [rcx+8]
       cmp      ebx, ebp
       ja       G_M58045_IG17
       mov      r14, bword ptr [rcx]
       ; byrRegs +[r14]
       sub      ebp, ebx
       mov      ecx, ebp
       ; byrRegs -[rcx]
       not      ecx
       shr      ecx, 31
       mov      rdx, qword ptr [(reloc)]
       mov      rdx, gword ptr [rdx]
       ; gcrRegs +[rdx]
       mov      rax, rdx
       ; gcrRegs +[rax]
       test     ecx, ecx
       jne      SHORT G_M58045_IG08

;; after

G_M58045_IG06:        ; gcrefRegs=00000080 {rdi}, byrefRegs=00000040 {rsi}, byref, isz
       movsd    qword ptr [rsp+50H], xmm6
       lea      rcx, bword ptr [rsi+24]
       ; byrRegs +[rcx]
       mov      ebx, dword ptr [rsi+16]
       mov      ebp, dword ptr [rcx+8]
       cmp      ebx, ebp
       ja       G_M58045_IG17
       mov      r14, bword ptr [rcx]
       ; byrRegs +[r14]
       sub      ebp, ebx
       mov      rcx, qword ptr [(reloc)]
       ; byrRegs -[rcx]
       mov      rdx, gword ptr [rcx]
       ; gcrRegs +[rdx]
       mov      rcx, rdx
       ; gcrRegs +[rcx]
       test     ebp, ebp
       jge      SHORT G_M58045_IG08

aspnet.run.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 13673160 (overridden on cmd)
Total bytes of diff: 13670369 (overridden on cmd)
Total bytes of delta: -2791 (-0.02 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          27 : 34028.dasm (0.99% of base)

Top file improvements (bytes):
         -67 : 8286.dasm (-10.36% of base)
         -34 : 8316.dasm (-5.80% of base)
         -33 : 8315.dasm (-5.08% of base)
         -33 : 38616.dasm (-1.67% of base)
         -32 : 8447.dasm (-7.64% of base)
         -31 : 8328.dasm (-6.55% of base)
         -27 : 24213.dasm (-5.51% of base)
         -27 : 21511.dasm (-5.51% of base)
         -26 : 21017.dasm (-1.41% of base)
         -24 : 39669.dasm (-3.75% of base)
         -24 : 16702.dasm (-10.34% of base)
         -24 : 33941.dasm (-4.32% of base)
         -22 : 15549.dasm (-1.43% of base)
         -22 : 30291.dasm (-0.62% of base)
         -22 : 29417.dasm (-0.66% of base)
         -22 : 34469.dasm (-0.62% of base)
         -22 : 40965.dasm (-0.65% of base)
         -20 : 39999.dasm (-0.67% of base)
         -20 : 21020.dasm (-3.88% of base)
         -20 : 6127.dasm (-3.12% of base)

263 total files with Code Size differences (262 improved, 1 regressed), 0 unchanged.

Top method regressions (bytes):
          27 ( 0.99% of base) : 34028.dasm - <OpenInternalAsync>d__70:MoveNext():this

Top method improvements (bytes):
         -67 (-10.36% of base) : 8286.dasm - PathInternal:GetRootLength(ReadOnlySpan`1):int
         -34 (-5.80% of base) : 8316.dasm - Path:CombineInternal(String,String):String
         -33 (-1.67% of base) : 38616.dasm - MemberInfoCache`1:PopulateMethods(Filter):ref:this
         -33 (-5.08% of base) : 8315.dasm - Path:Combine(String,String):String
         -32 (-7.64% of base) : 8447.dasm - TimeZoneInfo:CompareAdjustmentRuleToDateTime(AdjustmentRule,AdjustmentRule,DateTime,DateTime,bool):int:this
         -31 (-6.55% of base) : 8328.dasm - SafeFileHandle:CreateFile(String,int,int,int,int):SafeFileHandle
         -27 (-5.51% of base) : 24213.dasm - TypeMappingInfo:Equals(TypeMappingInfo):bool:this
         -27 (-5.51% of base) : 21511.dasm - TypeMappingInfo:Equals(TypeMappingInfo):bool:this
         -26 (-1.41% of base) : 21017.dasm - MemberInfoCache`1:PopulateMethods(Filter):ref:this
         -24 (-10.34% of base) : 16702.dasm - SingleEntryAsciiJumpTable:GetDestination(String,PathSegment):int:this
         -24 (-3.75% of base) : 39669.dasm - TypeMappingInfo:Equals(TypeMappingInfo):bool:this
         -24 (-4.32% of base) : 33941.dasm - TypeMappingInfo:Equals(TypeMappingInfo):bool:this
         -22 (-0.62% of base) : 30291.dasm - <ConnectAsync>d__202:MoveNext():this
         -22 (-0.66% of base) : 29417.dasm - <ConnectAsync>d__202:MoveNext():this
         -22 (-0.62% of base) : 34469.dasm - <ConnectAsync>d__202:MoveNext():this
         -22 (-0.65% of base) : 40965.dasm - <ConnectAsync>d__202:MoveNext():this
         -22 (-1.43% of base) : 15549.dasm - HttpConnectionPool:<CleanCacheAndDisposeIfUnused>g__IsUsableConnection|115_2(HttpConnectionBase,long,TimeSpan,TimeSpan):bool
         -20 (-0.67% of base) : 39999.dasm - <OpenInternalAsync>d__70:MoveNext():this
         -20 (-3.12% of base) : 6127.dasm - SocketPal:CreateSocket(int,int,int,byref):int
         -20 (-3.88% of base) : 21020.dasm - TextInfo:ChangeCaseCommon(String):String:this

Top method regressions (percentages):
          27 ( 0.99% of base) : 34028.dasm - <OpenInternalAsync>d__70:MoveNext():this

Top method improvements (percentages):
         -16 (-17.78% of base) : 8289.dasm - Path:IsPathRooted(ReadOnlySpan`1):bool
         -16 (-16.16% of base) : 8343.dasm - Path:IsPathRooted(String):bool
          -8 (-13.33% of base) : 28877.dasm - SafeSocketHandle:SetHandleAndValid(long):this
          -8 (-13.33% of base) : 4957.dasm - SafeSocketHandle:SetHandleAndValid(long):this
          -8 (-13.33% of base) : 41611.dasm - SafeSocketHandle:SetHandleAndValid(long):this
          -8 (-13.33% of base) : 14089.dasm - SafeSocketHandle:SetHandleAndValid(long):this
         -13 (-13.27% of base) : 8262.dasm - PathInternal:EnsureExtendedPrefixIfNeeded(String):String
         -19 (-12.10% of base) : 8287.dasm - PathInternal:IsDevice(ReadOnlySpan`1):bool
         -67 (-10.36% of base) : 8286.dasm - PathInternal:GetRootLength(ReadOnlySpan`1):int
         -24 (-10.34% of base) : 16702.dasm - SingleEntryAsciiJumpTable:GetDestination(String,PathSegment):int:this
          -8 (-8.70% of base) : 39355.dasm - SslStream:get_IsAuthenticated():bool:this
         -18 (-8.04% of base) : 24129.dasm - EntityType:FindIgnoredConfigurationSource(String):Nullable`1:this
         -32 (-7.64% of base) : 8447.dasm - TimeZoneInfo:CompareAdjustmentRuleToDateTime(AdjustmentRule,AdjustmentRule,DateTime,DateTime,bool):int:this
         -18 (-7.44% of base) : 20369.dasm - NpgsqlDatabaseInfo:ParseServerVersion(String):Version
         -18 (-7.44% of base) : 25902.dasm - NpgsqlDatabaseInfo:ParseServerVersion(String):Version
          -8 (-7.21% of base) : 10046.dasm - HttpRequestMessage:set_Method(HttpMethod):this
          -8 (-7.08% of base) : 21387.dasm - SslStream:get_IsAuthenticated():bool:this
          -8 (-6.61% of base) : 5753.dasm - TimerQueue:SetTimer(int):bool:this
         -31 (-6.55% of base) : 8328.dasm - SafeFileHandle:CreateFile(String,int,int,int,int):SafeFileHandle
         -34 (-5.80% of base) : 8316.dasm - Path:CombineInternal(String,String):String

263 total methods with Code Size differences (262 improved, 1 regressed), 0 unchanged.


benchmarks.run.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 7177822 (overridden on cmd)
Total bytes of diff: 7151059 (overridden on cmd)
Total bytes of delta: -26763 (-0.37 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          19 : 6170.dasm (3.65% of base)
           7 : 485.dasm (1.01% of base)
           7 : 12491.dasm (0.51% of base)
           6 : 16879.dasm (1.13% of base)
           4 : 3947.dasm (1.37% of base)
           4 : 24323.dasm (1.76% of base)
           2 : 17670.dasm (1.16% of base)
           1 : 5980.dasm (0.08% of base)

Top file improvements (bytes):
        -164 : 13854.dasm (-3.71% of base)
        -152 : 16615.dasm (-3.08% of base)
        -152 : 293.dasm (-4.86% of base)
        -147 : 21948.dasm (-7.25% of base)
        -123 : 12835.dasm (-27.21% of base)
        -117 : 6259.dasm (-14.62% of base)
        -109 : 15744.dasm (-8.65% of base)
        -101 : 11465.dasm (-8.36% of base)
         -97 : 13680.dasm (-5.23% of base)
         -97 : 10158.dasm (-7.77% of base)
         -94 : 21946.dasm (-6.30% of base)
         -94 : 6727.dasm (-2.15% of base)
         -94 : 14600.dasm (-6.49% of base)
         -93 : 4117.dasm (-9.75% of base)
         -92 : 20696.dasm (-1.95% of base)
         -92 : 25391.dasm (-1.44% of base)
         -89 : 21091.dasm (-3.45% of base)
         -88 : 3385.dasm (-7.38% of base)
         -88 : 16134.dasm (-1.41% of base)
         -87 : 16632.dasm (-1.16% of base)

1566 total files with Code Size differences (1558 improved, 8 regressed), 9 unchanged.

Top method regressions (bytes):
          19 ( 3.65% of base) : 6170.dasm - Registrations:Unregister(long,CallbackNode):bool:this
           7 ( 1.01% of base) : 485.dasm - ActivatorCache:.ctor(System.RuntimeType):this
           7 ( 0.51% of base) : 12491.dasm - System.Text.Json.Utf8JsonWriter:WriteNumberMinimized(System.ReadOnlySpan`1[Char],long):this
           6 ( 1.13% of base) : 16879.dasm - System.SpanHelpers:IndexOfAny(byref,int,int,int,int):int
           4 ( 1.76% of base) : 24323.dasm - System.SpanHelpers:Contains(byref,int,int):bool
           4 ( 1.37% of base) : 3947.dasm - System.Threading.Thread:SetThreadPoolWorkerThreadName():this
           2 ( 1.16% of base) : 17670.dasm - Builder[Int32][System.Int32]:set_Count(int):this
           1 ( 0.08% of base) : 5980.dasm - System.Text.Json.Utf8JsonWriter:WriteNumberValueIndented(long):this

Top method improvements (bytes):
        -164 (-3.71% of base) : 13854.dasm - DynamicClass:_DynamicMethod9(System.IO.TextReader,int):MicroBenchmarks.Serializers.MyEventsListerViewModel
        -152 (-3.08% of base) : 16615.dasm - DynamicClass:_DynamicMethod9(byref,int):MicroBenchmarks.Serializers.MyEventsListerViewModel
        -152 (-4.86% of base) : 293.dasm - MemberInfoCache`1[__Canon][System.__Canon]:PopulateMethods(Filter):System.Reflection.RuntimeMethodInfo[]:this
        -147 (-7.25% of base) : 21948.dasm - <WriteAsyncInternal>d__69:MoveNext():this
        -123 (-27.21% of base) : 12835.dasm - System.SpanHelpers:SequenceEqual(byref,byref,int):bool
        -117 (-14.62% of base) : 6259.dasm - System.Xml.DomNameTable:AddName(System.String,System.String,System.String,System.Xml.Schema.IXmlSchemaInfo):System.Xml.XmlName:this
        -109 (-8.65% of base) : 15744.dasm - System.Convert:TryFromBase64Chars(System.ReadOnlySpan`1[Char],System.Span`1[Byte],byref):bool
        -101 (-8.36% of base) : 11465.dasm - System.Runtime.Serialization.Formatters.Binary.ReadObjectInfo:GetMemberTypes(System.String[],System.Type):System.Type[]:this
         -97 (-7.77% of base) : 10158.dasm - System.Text.Encoding:GetCharsWithFallback(System.ReadOnlySpan`1[Byte],int,System.Span`1[Char],int,System.Text.DecoderNLS):int:this
         -97 (-5.23% of base) : 13680.dasm - System.Text.Json.JsonDocument:TryGetNamedPropertyValue(int,int,System.ReadOnlySpan`1[Byte],byref):bool:this
         -94 (-6.30% of base) : 21946.dasm - <InternalWriteAllLinesAsync>d__76:MoveNext():this
         -94 (-6.49% of base) : 14600.dasm - System.Text.Encoding:GetBytesWithFallback(System.ReadOnlySpan`1[Char],int,System.Span`1[Byte],int,System.Text.EncoderNLS):int:this
         -94 (-2.15% of base) : 6727.dasm - Utf8Json.Formatters.ISO8601DateTimeOffsetFormatter:Deserialize(byref,Utf8Json.IJsonFormatterResolver):System.DateTimeOffset:this
         -93 (-9.75% of base) : 4117.dasm - System.Collections.Generic.GenericArraySortHelper`2[Int32,Int32][System.Int32,System.Int32]:IntroSort(System.Span`1[Int32],System.Span`1[Int32],int)
         -92 (-1.44% of base) : 25391.dasm - DynamicClass:_DynamicMethod1(byref,int):MicroBenchmarks.Serializers.CollectionsOfPrimitives
         -92 (-1.95% of base) : 20696.dasm - Utf8Json.Formatters.ISO8601DateTimeFormatter:Deserialize(byref,Utf8Json.IJsonFormatterResolver):System.DateTime:this
         -89 (-3.45% of base) : 21091.dasm - System.Text.Json.Tests.Perf_Segment:ReadMultiSegmentSequenceUsingSpan(int):this
         -88 (-1.41% of base) : 16134.dasm - DynamicClass:_DynamicMethod1(System.IO.TextReader,int):MicroBenchmarks.Serializers.CollectionsOfPrimitives
         -88 (-7.38% of base) : 3385.dasm - System.Uri:Compress(System.Span`1[Char],System.UriParser):int
         -87 (-1.16% of base) : 16632.dasm - Jil.Deserialize.Methods:SkipWithLeadCharThunkReader(byref,int)

Top method regressions (percentages):
          19 ( 3.65% of base) : 6170.dasm - Registrations:Unregister(long,CallbackNode):bool:this
           4 ( 1.76% of base) : 24323.dasm - System.SpanHelpers:Contains(byref,int,int):bool
           4 ( 1.37% of base) : 3947.dasm - System.Threading.Thread:SetThreadPoolWorkerThreadName():this
           2 ( 1.16% of base) : 17670.dasm - Builder[Int32][System.Int32]:set_Count(int):this
           6 ( 1.13% of base) : 16879.dasm - System.SpanHelpers:IndexOfAny(byref,int,int,int,int):int
           7 ( 1.01% of base) : 485.dasm - ActivatorCache:.ctor(System.RuntimeType):this
           7 ( 0.51% of base) : 12491.dasm - System.Text.Json.Utf8JsonWriter:WriteNumberMinimized(System.ReadOnlySpan`1[Char],long):this
           1 ( 0.08% of base) : 5980.dasm - System.Text.Json.Utf8JsonWriter:WriteNumberValueIndented(long):this

Top method improvements (percentages):
         -79 (-27.43% of base) : 8144.dasm - System.Runtime.Serialization.Json.XmlJsonWriter:TrySetWritingNameWithMapping(System.String,System.String):bool:this
        -123 (-27.21% of base) : 12835.dasm - System.SpanHelpers:SequenceEqual(byref,byref,int):bool
         -30 (-26.32% of base) : 188.dasm - System.SZArrayHelper:GetEnumerator():System.Collections.Generic.IEnumerator`1[__Canon]:this
         -41 (-25.00% of base) : 1239.dasm - System.String:Equals(System.String):bool:this
         -58 (-22.57% of base) : 6224.dasm - System.Xml.NameTable:GetOrAddEntry(System.String,int):System.String:this
         -30 (-22.22% of base) : 713.dasm - System.SZArrayHelper:GetEnumerator():System.Collections.Generic.IEnumerator`1[Double]:this
         -41 (-22.04% of base) : 812.dasm - System.String:Equals(System.Object):bool:this
          -8 (-18.60% of base) : 12527.dasm - System.Xml.Linq.XNamespace:ExtractNamespace(System.WeakReference`1[[System.Xml.Linq.XNamespace, System.Private.Xml.Linq, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]]):System.String
         -22 (-17.19% of base) : 19455.dasm - Microsoft.Cci.MetadataWriter:MayUseSmallExceptionHeaders(System.Collections.Immutable.ImmutableArray`1[[Microsoft.Cci.ExceptionHandlerRegion, Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):bool
         -39 (-16.39% of base) : 3922.dasm - System.Threading.LowLevelLifoSemaphore:.ctor(int,int,int,System.Action):this
         -62 (-16.15% of base) : 2809.dasm - System.IO.PathInternal:GetRootLength(System.ReadOnlySpan`1[Char]):int
         -42 (-15.97% of base) : 10112.dasm - BigInteger:SubtractDivisor(byref,int,byref,long):int
         -41 (-15.89% of base) : 18936.dasm - Microsoft.CodeAnalysis.CSharp.MethodCompiler:ReportCtorInitializerCycles(Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol,Microsoft.CodeAnalysis.CSharp.BoundExpression,Microsoft.CodeAnalysis.CSharp.TypeCompilationState,Microsoft.CodeAnalysis.DiagnosticBag)
         -19 (-15.57% of base) : 1715.dasm - System.Reflection.CustomAttribute:GetCustomAttributes(System.Reflection.RuntimePropertyInfo,System.RuntimeType):System.Object[]
         -19 (-15.45% of base) : 6389.dasm - System.Reflection.CustomAttribute:GetCustomAttributes(System.Reflection.RuntimeModule,System.RuntimeType):System.Object[]
         -26 (-15.29% of base) : 19962.dasm - System.Globalization.DateTimeFormatInfoScanner:SkipWhiteSpacesAndNonLetter(System.String,int):int
        -117 (-14.62% of base) : 6259.dasm - System.Xml.DomNameTable:AddName(System.String,System.String,System.String,System.Xml.Schema.IXmlSchemaInfo):System.Xml.XmlName:this
          -8 (-14.55% of base) : 10868.dasm - Jil.Deserialize.Methods:_ReadSkipWhitespace(System.IO.TextReader):int
         -19 (-14.39% of base) : 1703.dasm - System.Reflection.CustomAttribute:IsDefined(System.Reflection.RuntimePropertyInfo,System.RuntimeType):bool
         -54 (-14.25% of base) : 11480.dasm - System.Runtime.Serialization.Formatters.Binary.ReadObjectInfo:Position(System.String):int:this

1566 total methods with Code Size differences (1558 improved, 8 regressed), 9 unchanged.


coreclr_tests.pmi.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 124320115 (overridden on cmd)
Total bytes of diff: 124284182 (overridden on cmd)
Total bytes of delta: -35933 (-0.03 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          14 : 238138.dasm (66.67% of base)
           2 : 223995.dasm (0.08% of base)
           1 : 249789.dasm (3.12% of base)
           1 : 138.dasm (0.15% of base)
           1 : 136.dasm (0.15% of base)

Top file improvements (bytes):
        -426 : 246398.dasm (-11.14% of base)
        -343 : 223866.dasm (-7.86% of base)
        -341 : 223844.dasm (-10.17% of base)
        -337 : 244694.dasm (-11.85% of base)
        -337 : 244695.dasm (-11.85% of base)
        -337 : 244696.dasm (-11.85% of base)
        -337 : 244711.dasm (-11.85% of base)
        -337 : 244712.dasm (-11.85% of base)
        -337 : 244713.dasm (-11.85% of base)
        -337 : 244715.dasm (-11.85% of base)
        -337 : 244716.dasm (-11.85% of base)
        -337 : 244717.dasm (-11.85% of base)
        -252 : 86915.dasm (-10.78% of base)
        -242 : 82159.dasm (-11.62% of base)
        -209 : 246390.dasm (-14.65% of base)
        -207 : 86058.dasm (-19.42% of base)
        -174 : 244693.dasm (-18.87% of base)
        -174 : 244710.dasm (-18.57% of base)
        -169 : 246383.dasm (-12.66% of base)
        -145 : 233545.dasm (-4.76% of base)

1257 total files with Code Size differences (1252 improved, 5 regressed), 0 unchanged.

Top method regressions (bytes):
          14 (66.67% of base) : 238138.dasm - InlineBool.Program:Id74(bool):bool
           2 ( 0.08% of base) : 223995.dasm - Program:Main():int
           1 ( 3.12% of base) : 249789.dasm - CTest:CheckDoubleAlignment(long):bool
           1 ( 0.15% of base) : 136.dasm - Kernel32:GetModuleBaseName(Microsoft.Win32.SafeHandles.SafeProcessHandle,long,System.Char[],int):int
           1 ( 0.15% of base) : 138.dasm - Kernel32:GetModuleFileNameEx(Microsoft.Win32.SafeHandles.SafeProcessHandle,long,System.Char[],int):int

Top method improvements (bytes):
        -426 (-11.14% of base) : 246398.dasm - SimpleEventListener:OnEventWritten(System.Diagnostics.Tracing.EventWrittenEventArgs):this
        -343 (-7.86% of base) : 223866.dasm - GCSimulator.ClientSimulator:ParseArgs(System.String[]):bool
        -341 (-10.17% of base) : 223844.dasm - GCSimulator.ClientSimulator:ParseArgs(System.String[]):bool
        -337 (-11.85% of base) : 244696.dasm - Test:TestGenInterface_GenType()
        -337 (-11.85% of base) : 244713.dasm - Test:TestGenInterface_GenType()
        -337 (-11.85% of base) : 244717.dasm - Test:TestGenInterface_GenType()
        -337 (-11.85% of base) : 244695.dasm - Test:TestGenInterface_NonGenType()
        -337 (-11.85% of base) : 244712.dasm - Test:TestGenInterface_NonGenType()
        -337 (-11.85% of base) : 244716.dasm - Test:TestGenInterface_NonGenType()
        -337 (-11.85% of base) : 244694.dasm - Test:TestNonGenInterface_GenType()
        -337 (-11.85% of base) : 244711.dasm - Test:TestNonGenInterface_GenType()
        -337 (-11.85% of base) : 244715.dasm - Test:TestNonGenInterface_GenType()
        -252 (-10.78% of base) : 86915.dasm - Test:Main():int
        -242 (-11.62% of base) : 82159.dasm - P:Main():int
        -209 (-14.65% of base) : 246390.dasm - SimpleEventListener:OnEventWritten(System.Diagnostics.Tracing.EventWrittenEventArgs):this
        -207 (-19.42% of base) : 86058.dasm - Test:Main():int
        -174 (-18.87% of base) : 244693.dasm - Test:TestNonGenInterface_NonGenType()
        -174 (-18.57% of base) : 244710.dasm - Test:TestNonGenInterface_NonGenType()
        -169 (-12.66% of base) : 246383.dasm - SimpleEventListener:OnEventWritten(System.Diagnostics.Tracing.EventWrittenEventArgs):this
        -145 (-4.76% of base) : 233545.dasm - ServerSimulator.Parameters:GetParams(System.String[]):bool:this

Top method regressions (percentages):
          14 (66.67% of base) : 238138.dasm - InlineBool.Program:Id74(bool):bool
           1 ( 3.12% of base) : 249789.dasm - CTest:CheckDoubleAlignment(long):bool
           1 ( 0.15% of base) : 136.dasm - Kernel32:GetModuleBaseName(Microsoft.Win32.SafeHandles.SafeProcessHandle,long,System.Char[],int):int
           1 ( 0.15% of base) : 138.dasm - Kernel32:GetModuleFileNameEx(Microsoft.Win32.SafeHandles.SafeProcessHandle,long,System.Char[],int):int
           2 ( 0.08% of base) : 223995.dasm - Program:Main():int

Top method improvements (percentages):
         -36 (-65.45% of base) : 84894.dasm - RVAOrderingTest:AddFields(long,long):int
          -8 (-47.06% of base) : 238100.dasm - InlineBool.Program:Id85(bool):bool
          -8 (-47.06% of base) : 238109.dasm - InlineBool.Program:Id95(bool):bool
         -13 (-44.83% of base) : 238094.dasm - InlineBool.Program:Id78(bool):bool
         -11 (-34.38% of base) : 252359.dasm - EqualityComparer_GitHub_10050:GeneralHoist(int,int):int
         -11 (-33.33% of base) : 252362.dasm - EqualityComparer_GitHub_10050:GeneralHoist(long,long):int
         -14 (-29.79% of base) : 252358.dasm - EqualityComparer_GitHub_10050:GeneralHoist(short,short):int
          -5 (-23.81% of base) : 238124.dasm - InlineBool.Program:Id58(bool):bool
          -5 (-23.81% of base) : 238133.dasm - InlineBool.Program:Id68(bool):bool
          -5 (-23.81% of base) : 238135.dasm - InlineBool.Program:Id70(bool):bool
          -5 (-23.81% of base) : 238095.dasm - InlineBool.Program:Id79(bool):bool
          -5 (-23.81% of base) : 238097.dasm - InlineBool.Program:Id81(bool):bool
          -5 (-23.81% of base) : 238103.dasm - InlineBool.Program:Id88(bool):bool
          -5 (-23.81% of base) : 238106.dasm - InlineBool.Program:Id91(bool):bool
          -5 (-23.81% of base) : 238112.dasm - InlineBool.Program:Id98(bool):bool
        -130 (-23.68% of base) : 83791.dasm - X:F():int
         -44 (-23.53% of base) : 246450.dasm - RuntimeEventListener:OnEventSourceCreated(System.Diagnostics.Tracing.EventSource):this
         -44 (-23.53% of base) : 251237.dasm - Tracing.Tests.RuntimeEventListener:OnEventSourceCreated(System.Diagnostics.Tracing.EventSource):this
        -118 (-22.69% of base) : 251238.dasm - Tracing.Tests.RuntimeEventListener:OnEventWritten(System.Diagnostics.Tracing.EventWrittenEventArgs):this
         -37 (-22.42% of base) : 210247.dasm - Internal.IL.ILImporter:CheckPendingPrefix(int):this

1257 total methods with Code Size differences (1252 improved, 5 regressed), 0 unchanged.


libraries.crossgen2.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 34327568 (overridden on cmd)
Total bytes of diff: 34280367 (overridden on cmd)
Total bytes of delta: -47201 (-0.14 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          65 : 76629.dasm (5.23% of base)
           9 : 90859.dasm (0.24% of base)
           8 : 58093.dasm (0.22% of base)
           6 : 64194.dasm (0.56% of base)
           4 : 58133.dasm (0.35% of base)
           4 : 59347.dasm (0.45% of base)
           2 : 71465.dasm (0.47% of base)
           2 : 71403.dasm (1.07% of base)
           2 : 210722.dasm (0.34% of base)
           2 : 59108.dasm (0.05% of base)
           1 : 102426.dasm (0.23% of base)
           1 : 147420.dasm (0.19% of base)

Top file improvements (bytes):
        -429 : 66780.dasm (-11.70% of base)
        -219 : 70868.dasm (-26.20% of base)
        -211 : 58158.dasm (-8.73% of base)
        -203 : 57386.dasm (-7.26% of base)
        -188 : 66439.dasm (-7.12% of base)
        -174 : 68430.dasm (-7.19% of base)
        -170 : 58822.dasm (-9.15% of base)
        -136 : 66469.dasm (-9.58% of base)
        -132 : 72597.dasm (-9.04% of base)
        -131 : 170137.dasm (-5.29% of base)
        -130 : 57402.dasm (-5.05% of base)
        -129 : 58965.dasm (-6.37% of base)
        -126 : 77250.dasm (-18.39% of base)
        -124 : 77271.dasm (-11.83% of base)
        -122 : 77251.dasm (-16.85% of base)
        -120 : 71472.dasm (-7.15% of base)
        -120 : 71473.dasm (-6.96% of base)
        -120 : 71474.dasm (-7.60% of base)
        -118 : 77233.dasm (-26.52% of base)
        -112 : 63862.dasm (-8.41% of base)

2806 total files with Code Size differences (2794 improved, 12 regressed), 6 unchanged.

Top method regressions (bytes):
          65 ( 5.23% of base) : 76629.dasm - System.Collections.Generic.Dictionary`2:TryInsert(System.__Canon,System.Resources.ResourceLocator,ubyte):bool:this
           9 ( 0.24% of base) : 90859.dasm - Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxNormalizer:RewriteTrivia(Microsoft.CodeAnalysis.SyntaxTriviaList,int,bool,bool,bool,int):Microsoft.CodeAnalysis.SyntaxTriviaList:this
           8 ( 0.22% of base) : 58093.dasm - <ReadAsyncSlowPath>d__39:MoveNext():this
           6 ( 0.56% of base) : 64194.dasm - System.Text.StringBuilder:Replace(System.String,System.String,int,int):System.Text.StringBuilder:this
           4 ( 0.45% of base) : 59347.dasm - System.IO.BufferedStream:ReadAsync(System.Memory`1[System.Byte],System.Threading.CancellationToken):System.Threading.Tasks.ValueTask`1[System.Int32]:this
           4 ( 0.35% of base) : 58133.dasm - System.IO.Strategies.BufferedFileStreamStrategy:ReadAsync(System.Memory`1[System.Byte],System.Threading.CancellationToken):System.Threading.Tasks.ValueTask`1[System.Int32]:this
           2 ( 0.05% of base) : 59108.dasm - <WriteToFileAsync>d__89:MoveNext():this
           2 ( 1.07% of base) : 71403.dasm - Grisu3:BiggestPowerTen(int,int,byref):int
           2 ( 0.34% of base) : 210722.dasm - ILCompiler.Reflection.ReadyToRun.PgoInfo:ToString():System.String:this
           2 ( 0.47% of base) : 71465.dasm - System.Number:GetException(int,int):System.Exception
           1 ( 0.19% of base) : 147420.dasm - Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation:SerializeLocalSlots(Microsoft.Cci.BlobBuilder):this
           1 ( 0.23% of base) : 102426.dasm - Microsoft.CSharp.RuntimeBinder.Semantics.ConstVal:IsDefault(System.Object):bool

Top method improvements (bytes):
        -429 (-11.70% of base) : 66780.dasm - System.Globalization.TimeSpanFormat:TryFormatStandard(System.TimeSpan,int,System.String,System.Span`1[System.Char],byref):bool
        -219 (-26.20% of base) : 70868.dasm - System.SpanHelpers:SequenceEqual(byref,byref,int):bool
        -211 (-8.73% of base) : 58158.dasm - System.IO.PathHelper:TryExpandShortFileName(byref,System.String):System.String
        -203 (-7.26% of base) : 57386.dasm - System.Diagnostics.Tracing.EventPipePayloadDecoder:DecodePayload(byref,System.ReadOnlySpan`1[System.Byte]):System.Object[]
        -188 (-7.12% of base) : 66439.dasm - System.Buffers.Text.Utf8Formatter:TryFormat(System.TimeSpan,System.Span`1[System.Byte],byref,System.Buffers.StandardFormat):bool
        -174 (-7.19% of base) : 68430.dasm - System.Numerics.Matrix4x4:ToString():System.String:this
        -170 (-9.15% of base) : 58822.dasm - System.IO.Path:GetFullPath(System.String,System.String):System.String
        -136 (-9.58% of base) : 66469.dasm - System.Buffers.Text.Utf8Formatter:TryFormatDateTimeO(System.DateTime,System.TimeSpan,System.Span`1[System.Byte],byref):bool
        -132 (-9.04% of base) : 72597.dasm - System.DateTimeFormat:TryFormatO(System.DateTime,System.TimeSpan,System.Span`1[System.Char],byref):bool
        -131 (-5.29% of base) : 170137.dasm - System.Transactions.TransactionScope:Dispose():this
        -130 (-5.05% of base) : 57402.dasm - System.Diagnostics.Tracing.EventPipeMetadataGenerator:GenerateMetadata(int,System.String,long,int,int,int,System.Diagnostics.Tracing.EventParameterInfo[]):System.Byte[]:this
        -129 (-6.37% of base) : 58965.dasm - System.IO.FileSystem:GetImmediateLinkTarget(System.String,bool,bool,bool):System.String
        -126 (-18.39% of base) : 77250.dasm - System.SpanHelpers:IndexOf(byref,float,int):int
        -124 (-11.83% of base) : 77271.dasm - System.Collections.Generic.ArraySortHelper`2:IntroSort(System.Span`1[System.Double],System.Span`1[System.Double],int,System.Collections.Generic.IComparer`1[System.Double])
        -122 (-16.85% of base) : 77251.dasm - System.SpanHelpers:IndexOf(byref,double,int):int
        -120 (-7.60% of base) : 71474.dasm - System.Number:TryParseDouble(System.ReadOnlySpan`1[System.Char],int,System.Globalization.NumberFormatInfo,byref):bool
        -120 (-6.96% of base) : 71473.dasm - System.Number:TryParseHalf(System.ReadOnlySpan`1[System.Char],int,System.Globalization.NumberFormatInfo,byref):bool
        -120 (-7.15% of base) : 71472.dasm - System.Number:TryParseSingle(System.ReadOnlySpan`1[System.Char],int,System.Globalization.NumberFormatInfo,byref):bool
        -118 (-26.52% of base) : 77233.dasm - System.SpanHelpers:SequenceEqual(byref,byref,int):bool
        -112 (-8.41% of base) : 63862.dasm - System.Text.Encoding:GetCharsWithFallback(System.ReadOnlySpan`1[System.Byte],int,System.Span`1[System.Char],int,System.Text.DecoderNLS):int:this

Top method regressions (percentages):
          65 ( 5.23% of base) : 76629.dasm - System.Collections.Generic.Dictionary`2:TryInsert(System.__Canon,System.Resources.ResourceLocator,ubyte):bool:this
           2 ( 1.07% of base) : 71403.dasm - Grisu3:BiggestPowerTen(int,int,byref):int
           6 ( 0.56% of base) : 64194.dasm - System.Text.StringBuilder:Replace(System.String,System.String,int,int):System.Text.StringBuilder:this
           2 ( 0.47% of base) : 71465.dasm - System.Number:GetException(int,int):System.Exception
           4 ( 0.45% of base) : 59347.dasm - System.IO.BufferedStream:ReadAsync(System.Memory`1[System.Byte],System.Threading.CancellationToken):System.Threading.Tasks.ValueTask`1[System.Int32]:this
           4 ( 0.35% of base) : 58133.dasm - System.IO.Strategies.BufferedFileStreamStrategy:ReadAsync(System.Memory`1[System.Byte],System.Threading.CancellationToken):System.Threading.Tasks.ValueTask`1[System.Int32]:this
           2 ( 0.34% of base) : 210722.dasm - ILCompiler.Reflection.ReadyToRun.PgoInfo:ToString():System.String:this
           9 ( 0.24% of base) : 90859.dasm - Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxNormalizer:RewriteTrivia(Microsoft.CodeAnalysis.SyntaxTriviaList,int,bool,bool,bool,int):Microsoft.CodeAnalysis.SyntaxTriviaList:this
           1 ( 0.23% of base) : 102426.dasm - Microsoft.CSharp.RuntimeBinder.Semantics.ConstVal:IsDefault(System.Object):bool
           8 ( 0.22% of base) : 58093.dasm - <ReadAsyncSlowPath>d__39:MoveNext():this
           1 ( 0.19% of base) : 147420.dasm - Microsoft.CodeAnalysis.Emit.EditAndContinueMethodDebugInformation:SerializeLocalSlots(Microsoft.Cci.BlobBuilder):this
           2 ( 0.05% of base) : 59108.dasm - <WriteToFileAsync>d__89:MoveNext():this

Top method improvements (percentages):
        -118 (-26.52% of base) : 77233.dasm - System.SpanHelpers:SequenceEqual(byref,byref,int):bool
         -38 (-26.39% of base) : 99966.dasm - System.Speech.Internal.SrgsCompiler.CfgRule:.ctor(int,int,int):this
         -31 (-26.27% of base) : 75535.dasm - System.SZArrayHelper:GetEnumerator():System.Collections.Generic.IEnumerator`1[System.__Canon]:this
        -219 (-26.20% of base) : 70868.dasm - System.SpanHelpers:SequenceEqual(byref,byref,int):bool
         -21 (-25.93% of base) : 65247.dasm - GateThread:GetRunningStateForNumRuns(int):int
          -8 (-25.81% of base) : 67225.dasm - System.Globalization.IdnMapping:EncodeBasic(ushort):ushort
          -8 (-25.00% of base) : 79382.dasm - <>c:<Analyze>b__4_0(Microsoft.CodeAnalysis.CSharp.DataFlowPass+VariableIdentifier):bool:this
          -8 (-24.24% of base) : 92999.dasm - Microsoft.CodeAnalysis.CSharp.SyntheticBoundNodeFactory:This(Microsoft.CodeAnalysis.CSharp.Symbols.LocalSymbol):Microsoft.CodeAnalysis.CSharp.BoundExpression:this
         -63 (-23.33% of base) : 113181.dasm - System.Xml.Xsl.IlGen.XmlILOptimizerVisitor:IsPrimitiveNumeric(System.Xml.Xsl.XmlQueryType):bool:this
         -63 (-23.33% of base) : 113180.dasm - System.Xml.Xsl.IlGen.XmlILOptimizerVisitor:MatchesContentTest(System.Xml.Xsl.XmlQueryType):bool:this
         -11 (-20.75% of base) : 74435.dasm - System.String:GetCaseCompareOfComparisonCulture(int):int
         -11 (-20.37% of base) : 79882.dasm - BestSymbolInfo:Sort(byref,byref):bool
          -8 (-20.00% of base) : 33395.dasm - Microsoft.CodeAnalysis.VisualBasic.SyntaxFacts:ReturnFullWidthOrSelf(ushort):ushort
         -18 (-19.78% of base) : 75634.dasm - System.Array:GetMedian(int,int):int
         -11 (-19.64% of base) : 64124.dasm - System.Text.ASCIIUtility:ContainsNonAsciiByte_Sse2(int):bool
         -33 (-19.19% of base) : 63661.dasm - System.Text.TranscodingStream:.ctor(System.IO.Stream,System.Text.Encoding,System.Text.Encoding,bool):this
         -14 (-19.18% of base) : 77861.dasm - LocalUsedWalker:VisitLocal(Microsoft.CodeAnalysis.CSharp.BoundLocal):Microsoft.CodeAnalysis.CSharp.BoundNode:this
         -44 (-19.13% of base) : 100019.dasm - System.Speech.Internal.SrgsCompiler.Backend:SetRuleAttributes(System.Speech.Internal.SrgsCompiler.Rule,int):this
         -11 (-18.97% of base) : 73175.dasm - System.DateOnly:.ctor(int):this
         -10 (-18.87% of base) : 66488.dasm - System.Buffers.Utilities:GetMaxSizeForBucket(int):int

2806 total methods with Code Size differences (2794 improved, 12 regressed), 6 unchanged.


libraries.pmi.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 45431059 (overridden on cmd)
Total bytes of diff: 45333782 (overridden on cmd)
Total bytes of delta: -97277 (-0.21 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
          34 : 153586.dasm (0.83% of base)
           8 : 24063.dasm (3.11% of base)
           7 : 15931.dasm (2.72% of base)
           6 : 15889.dasm (1.13% of base)
           5 : 158557.dasm (0.31% of base)
           4 : 15882.dasm (0.78% of base)
           4 : 78445.dasm (0.46% of base)
           4 : 15933.dasm (1.76% of base)
           4 : 150531.dasm (0.17% of base)
           3 : 211884.dasm (0.21% of base)
           3 : 15936.dasm (1.15% of base)
           3 : 15950.dasm (0.32% of base)
           2 : 171484.dasm (1.18% of base)
           1 : 136.dasm (0.15% of base)
           1 : 15887.dasm (0.16% of base)
           1 : 168024.dasm (0.04% of base)
           1 : 138.dasm (0.15% of base)
           1 : 22538.dasm (0.10% of base)

Top file improvements (bytes):
        -327 : 15890.dasm (-16.80% of base)
        -323 : 15907.dasm (-16.68% of base)
        -219 : 15884.dasm (-16.25% of base)
        -211 : 15901.dasm (-15.84% of base)
        -166 : 157998.dasm (-8.02% of base)
        -159 : 154058.dasm (-16.56% of base)
        -135 : 131972.dasm (-6.52% of base)
        -125 : 150537.dasm (-4.06% of base)
        -124 : 188258.dasm (-5.05% of base)
        -124 : 135777.dasm (-5.04% of base)
        -124 : 135807.dasm (-3.47% of base)
        -123 : 15911.dasm (-27.21% of base)
        -120 : 82.dasm (-5.31% of base)
        -119 : 151709.dasm (-5.67% of base)
        -116 : 229216.dasm (-3.62% of base)
        -115 : 15934.dasm (-16.55% of base)
        -114 : 20626.dasm (-10.68% of base)
        -111 : 135020.dasm (-13.42% of base)
        -109 : 231665.dasm (-1.51% of base)
        -105 : 181829.dasm (-6.50% of base)

5917 total files with Code Size differences (5899 improved, 18 regressed), 20 unchanged.

Top method regressions (bytes):
          34 ( 0.83% of base) : 153586.dasm - System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1[Byte][System.Byte]:OnTryRead(byref,System.Type,System.Text.Json.JsonSerializerOptions,byref,byref):bool:this
           8 ( 3.11% of base) : 24063.dasm - Microsoft.CodeAnalysis.CSharp.Binder:ReportDiagnosticsIfObsolete(Microsoft.CodeAnalysis.DiagnosticBag,Microsoft.CodeAnalysis.CSharp.Conversion,Microsoft.CodeAnalysis.SyntaxNodeOrToken,bool):this
           7 ( 2.72% of base) : 15931.dasm - System.SpanHelpers:Contains(byref,ubyte,int):bool
           6 ( 1.13% of base) : 15889.dasm - System.SpanHelpers:IndexOfAny(byref,int,int,int,int):int
           5 ( 0.31% of base) : 158557.dasm - Internal.TypeSystem.ConstructedTypeRewritingHelpers:ReplaceTypesInConstructionOfType(Internal.TypeSystem.TypeDesc,Internal.TypeSystem.TypeDesc[],Internal.TypeSystem.TypeDesc[]):Internal.TypeSystem.TypeDesc
           4 ( 0.46% of base) : 78445.dasm - Microsoft.CodeAnalysis.AssemblyIdentityComparer:Compare(Microsoft.CodeAnalysis.AssemblyIdentity,System.String,Microsoft.CodeAnalysis.AssemblyIdentity,byref,bool):int:this
           4 ( 1.76% of base) : 15933.dasm - System.SpanHelpers:Contains(byref,int,int):bool
           4 ( 0.78% of base) : 15882.dasm - System.SpanHelpers:IndexOfAny(byref,short,short,int):int
           4 ( 0.17% of base) : 150531.dasm - System.Text.GB18030Encoding:GetBytes(long,int,long,int,System.Text.EncoderNLS):int:this
           3 ( 0.21% of base) : 211884.dasm - System.Numerics.Tensors.Tensor`1[Byte][System.Byte]:CompareTo(System.Numerics.Tensors.Tensor`1[Byte],System.Collections.IComparer):int:this
           3 ( 1.15% of base) : 15936.dasm - System.SpanHelpers:Contains(byref,long,int):bool
           3 ( 0.32% of base) : 15950.dasm - System.SpanHelpers:LastIndexOfAny(byref,ubyte,ubyte,ubyte,int):int
           2 ( 1.18% of base) : 171484.dasm - Builder[Byte][System.Byte]:set_Count(int):this
           1 ( 0.15% of base) : 136.dasm - Kernel32:GetModuleBaseName(Microsoft.Win32.SafeHandles.SafeProcessHandle,long,System.Char[],int):int
           1 ( 0.15% of base) : 138.dasm - Kernel32:GetModuleFileNameEx(Microsoft.Win32.SafeHandles.SafeProcessHandle,long,System.Char[],int):int
           1 ( 0.10% of base) : 22538.dasm - Microsoft.CSharp.RuntimeBinder.Semantics.ConstVal:IsDefault(System.Object):bool
           1 ( 0.04% of base) : 168024.dasm - R2RTest.BuildFolder:WriteJitStatistics(System.IO.TextWriter,System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.HashSet`1[System.String]][],System.Collections.Generic.IEnumerable`1[[R2RTest.CompilerRunner, R2RTest, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null]])
           1 ( 0.16% of base) : 15887.dasm - System.SpanHelpers:IndexOfAny(byref,ubyte,ubyte,ubyte,int):int

Top method improvements (bytes):
        -327 (-16.80% of base) : 15890.dasm - System.SpanHelpers:IndexOfAny(byref,double,double,double,int):int
        -323 (-16.68% of base) : 15907.dasm - System.SpanHelpers:LastIndexOfAny(byref,double,double,double,int):int
        -219 (-16.25% of base) : 15884.dasm - System.SpanHelpers:IndexOfAny(byref,double,double,int):int
        -211 (-15.84% of base) : 15901.dasm - System.SpanHelpers:LastIndexOfAny(byref,double,double,int):int
        -166 (-8.02% of base) : 157998.dasm - Internal.IL.ILStackHelper:ComputeMaxStack(Internal.IL.MethodIL):int
        -159 (-16.56% of base) : 154058.dasm - System.Text.RegularExpressions.RegexCharClass:AddCategoryFromName(System.String,bool,bool,System.String,int):this
        -135 (-6.52% of base) : 131972.dasm - System.Xml.ValidateNames:ValidateNameInternal(System.String,System.String,System.String,int,int,bool):bool
        -125 (-4.06% of base) : 150537.dasm - System.Text.GB18030Encoding:GetChars(long,int,long,int,System.Text.DecoderNLS):int:this
        -124 (-3.47% of base) : 135807.dasm - <ParseAttlistDeclAsync>d__160:MoveNext():this
        -124 (-5.05% of base) : 188258.dasm - System.Diagnostics.CategorySample:.ctor(System.Byte[],System.Diagnostics.CategoryEntry,System.Diagnostics.PerformanceCounterLib):this
        -124 (-5.04% of base) : 135777.dasm - System.Xml.DtdParser:ParseAttlistDecl():this
        -123 (-27.21% of base) : 15911.dasm - System.SpanHelpers:SequenceEqual(byref,byref,int):bool
        -120 (-5.31% of base) : 82.dasm - System.Text.RegularExpressions.RegexReplacement:.ctor(System.String,System.Text.RegularExpressions.RegexNode,System.Collections.Hashtable):this
        -119 (-5.67% of base) : 151709.dasm - System.Text.Json.JsonSerializer:TryGetReferenceFromJsonElement(byref,System.Text.Json.JsonElement,byref):bool
        -116 (-3.62% of base) : 229216.dasm - System.Transactions.TransactionScope:Dispose():this
        -115 (-16.55% of base) : 15934.dasm - System.SpanHelpers:Contains(byref,double,int):bool
        -114 (-10.68% of base) : 20626.dasm - System.Collections.Generic.ArraySortHelper`2[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:IntroSort(System.Span`1[Byte],System.Span`1[Nullable`1],int,System.Collections.Generic.IComparer`1[Byte])
        -111 (-13.42% of base) : 135020.dasm - System.Xml.DomNameTable:AddName(System.String,System.String,System.String,System.Xml.Schema.IXmlSchemaInfo):System.Xml.XmlName:this
        -109 (-1.51% of base) : 231665.dasm - TestRunner:DoWorkStress():int:this
        -105 (-4.42% of base) : 29049.dasm - Microsoft.CodeAnalysis.CSharp.ExpressionLambdaRewriter:VisitConversion(Microsoft.CodeAnalysis.CSharp.BoundConversion):Microsoft.CodeAnalysis.CSharp.BoundExpression:this

Top method regressions (percentages):
           8 ( 3.11% of base) : 24063.dasm - Microsoft.CodeAnalysis.CSharp.Binder:ReportDiagnosticsIfObsolete(Microsoft.CodeAnalysis.DiagnosticBag,Microsoft.CodeAnalysis.CSharp.Conversion,Microsoft.CodeAnalysis.SyntaxNodeOrToken,bool):this
           7 ( 2.72% of base) : 15931.dasm - System.SpanHelpers:Contains(byref,ubyte,int):bool
           4 ( 1.76% of base) : 15933.dasm - System.SpanHelpers:Contains(byref,int,int):bool
           2 ( 1.18% of base) : 171484.dasm - Builder[Byte][System.Byte]:set_Count(int):this
           3 ( 1.15% of base) : 15936.dasm - System.SpanHelpers:Contains(byref,long,int):bool
           6 ( 1.13% of base) : 15889.dasm - System.SpanHelpers:IndexOfAny(byref,int,int,int,int):int
          34 ( 0.83% of base) : 153586.dasm - System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1[Byte][System.Byte]:OnTryRead(byref,System.Type,System.Text.Json.JsonSerializerOptions,byref,byref):bool:this
           4 ( 0.78% of base) : 15882.dasm - System.SpanHelpers:IndexOfAny(byref,short,short,int):int
           4 ( 0.46% of base) : 78445.dasm - Microsoft.CodeAnalysis.AssemblyIdentityComparer:Compare(Microsoft.CodeAnalysis.AssemblyIdentity,System.String,Microsoft.CodeAnalysis.AssemblyIdentity,byref,bool):int:this
           3 ( 0.32% of base) : 15950.dasm - System.SpanHelpers:LastIndexOfAny(byref,ubyte,ubyte,ubyte,int):int
           5 ( 0.31% of base) : 158557.dasm - Internal.TypeSystem.ConstructedTypeRewritingHelpers:ReplaceTypesInConstructionOfType(Internal.TypeSystem.TypeDesc,Internal.TypeSystem.TypeDesc[],Internal.TypeSystem.TypeDesc[]):Internal.TypeSystem.TypeDesc
           3 ( 0.21% of base) : 211884.dasm - System.Numerics.Tensors.Tensor`1[Byte][System.Byte]:CompareTo(System.Numerics.Tensors.Tensor`1[Byte],System.Collections.IComparer):int:this
           4 ( 0.17% of base) : 150531.dasm - System.Text.GB18030Encoding:GetBytes(long,int,long,int,System.Text.EncoderNLS):int:this
           1 ( 0.16% of base) : 15887.dasm - System.SpanHelpers:IndexOfAny(byref,ubyte,ubyte,ubyte,int):int
           1 ( 0.15% of base) : 136.dasm - Kernel32:GetModuleBaseName(Microsoft.Win32.SafeHandles.SafeProcessHandle,long,System.Char[],int):int
           1 ( 0.15% of base) : 138.dasm - Kernel32:GetModuleFileNameEx(Microsoft.Win32.SafeHandles.SafeProcessHandle,long,System.Char[],int):int
           1 ( 0.10% of base) : 22538.dasm - Microsoft.CSharp.RuntimeBinder.Semantics.ConstVal:IsDefault(System.Object):bool
           1 ( 0.04% of base) : 168024.dasm - R2RTest.BuildFolder:WriteJitStatistics(System.IO.TextWriter,System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.HashSet`1[System.String]][],System.Collections.Generic.IEnumerable`1[[R2RTest.CompilerRunner, R2RTest, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null]])

Top method improvements (percentages):
          -8 (-34.78% of base) : 29664.dasm - Microsoft.CodeAnalysis.CSharp.SyntheticBoundNodeFactory:This(Microsoft.CodeAnalysis.CSharp.Symbols.LocalSymbol):Microsoft.CodeAnalysis.CSharp.BoundExpression:this
          -8 (-29.63% of base) : 46355.dasm - <>c:<Analyze>b__4_0(VariableIdentifier):bool:this
         -79 (-27.34% of base) : 128386.dasm - System.Runtime.Serialization.Json.XmlJsonWriter:TrySetWritingNameWithMapping(System.String,System.String):bool:this
        -123 (-27.21% of base) : 15911.dasm - System.SpanHelpers:SequenceEqual(byref,byref,int):bool
          -8 (-26.67% of base) : 186297.dasm - System.Data.Common.ADP:GetOletxTransaction(System.Transactions.Transaction):System.Transactions.IDtcTransaction
         -38 (-26.39% of base) : 149640.dasm - System.Speech.Internal.SrgsCompiler.CfgRule:.ctor(int,int,int):this
         -81 (-26.30% of base) : 131969.dasm - System.Xml.ValidateNames:IsReservedNamespace(System.String):bool
          -8 (-25.00% of base) : 186459.dasm - TransactedConnectionList:Dispose():this
         -39 (-24.68% of base) : 108784.dasm - System.Data.XmlDataLoader:FExcludedNamespace(System.String):bool:this
         -48 (-22.97% of base) : 224036.dasm - System.Security.Cryptography.Xml.Utils:IsXmlNamespaceNode(System.Xml.XmlNode):bool
         -58 (-22.48% of base) : 131946.dasm - System.Xml.NameTable:GetOrAddEntry(System.String,int):System.String:this
         -30 (-22.22% of base) : 14858.dasm - System.SZArrayHelper:GetEnumerator():System.Collections.Generic.IEnumerator`1[Int16]:this
         -81 (-21.72% of base) : 224035.dasm - System.Security.Cryptography.Xml.Utils:IsNamespaceNode(System.Xml.XmlNode):bool
         -50 (-21.65% of base) : 224037.dasm - System.Security.Cryptography.Xml.Utils:IsDefaultNamespaceNode(System.Xml.XmlNode):bool
         -67 (-21.54% of base) : 142033.dasm - System.Xml.Xsl.IlGen.XmlILOptimizerVisitor:IsPrimitiveNumeric(System.Xml.Xsl.XmlQueryType):bool:this
         -67 (-21.54% of base) : 142034.dasm - System.Xml.Xsl.IlGen.XmlILOptimizerVisitor:MatchesContentTest(System.Xml.Xsl.XmlQueryType):bool:this
          -8 (-21.05% of base) : 29750.dasm - Microsoft.CodeAnalysis.CSharp.SyntaxFacts:IsKeywordKind(ushort):bool
         -69 (-20.72% of base) : 57272.dasm - Microsoft.CodeAnalysis.VisualBasic.LocalRewriter:ReportMissingRuntimeHelper(Microsoft.CodeAnalysis.VisualBasic.BoundNode,System.String,System.String,Microsoft.CodeAnalysis.DiagnosticBag,bool)
         -23 (-20.54% of base) : 158748.dasm - Internal.TypeSystem.MetadataFieldLayoutAlgorithm:CalculateLog2(int):int
         -11 (-20.37% of base) : 45832.dasm - BestSymbolInfo:Sort(byref,byref):bool

5917 total methods with Code Size differences (5899 improved, 18 regressed), 20 unchanged.


libraries_tests.pmi.windows.x64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 114333791 (overridden on cmd)
Total bytes of diff: 114190867 (overridden on cmd)
Total bytes of delta: -142924 (-0.13 % of base)
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file regressions (bytes):
         125 : 96241.dasm (3.13% of base)
         112 : 96240.dasm (2.97% of base)
           4 : 96326.dasm (0.17% of base)
           4 : 96327.dasm (0.17% of base)
           4 : 96328.dasm (0.17% of base)
           4 : 96329.dasm (0.17% of base)
           4 : 96330.dasm (0.17% of base)
           4 : 96331.dasm (0.17% of base)
           3 : 310962.dasm (0.38% of base)
           3 : 134014.dasm (0.35% of base)
           3 : 310728.dasm (0.38% of base)
           3 : 310729.dasm (0.38% of base)
           3 : 311075.dasm (0.38% of base)
           3 : 243587.dasm (0.76% of base)
           3 : 64828.dasm (0.25% of base)
           3 : 310786.dasm (0.38% of base)
           3 : 310787.dasm (0.38% of base)
           3 : 196090.dasm (0.19% of base)
           3 : 196092.dasm (0.19% of base)
           3 : 311019.dasm (0.38% of base)

Top file improvements (bytes):
        -281 : 177036.dasm (-14.20% of base)
        -221 : 190968.dasm (-3.40% of base)
        -221 : 70414.dasm (-3.40% of base)
        -190 : 72384.dasm (-5.94% of base)
        -190 : 323359.dasm (-5.94% of base)
        -190 : 72653.dasm (-5.94% of base)
        -190 : 324023.dasm (-5.89% of base)
        -190 : 324379.dasm (-5.89% of base)
        -190 : 323445.dasm (-5.94% of base)
        -189 : 190966.dasm (-3.06% of base)
        -189 : 70412.dasm (-3.06% of base)
        -187 : 71347.dasm (-6.20% of base)
        -187 : 323182.dasm (-6.20% of base)
        -184 : 72989.dasm (-5.96% of base)
        -184 : 323488.dasm (-5.96% of base)
        -183 : 323580.dasm (-6.00% of base)
        -182 : 344431.dasm (-6.01% of base)
        -179 : 324471.dasm (-5.66% of base)
        -172 : 344430.dasm (-6.16% of base)
        -171 : 176521.dasm (-16.13% of base)

8160 total files with Code Size differences (8133 improved, 27 regressed), 10 unchanged.

Top method regressions (bytes):
         125 ( 3.13% of base) : 96241.dasm - System.Text.Json.Tests.Utf8JsonReaderTests:TestSingleStrings()
         112 ( 2.97% of base) : 96240.dasm - System.Text.Json.Tests.Utf8JsonReaderTests:TestPartialJsonReader(bool,int,System.String)
           4 ( 0.17% of base) : 96329.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNullPropertyName_Simple(double,System.String,System.Action`3[[System.Text.Json.Utf8JsonWriter, System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Double, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],WritePropertySpanAction`2[Char,Double],WritePropertySpanAction`2[Byte,Double])
           4 ( 0.17% of base) : 96328.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNullPropertyName_Simple(int,System.String,System.Action`3[[System.Text.Json.Utf8JsonWriter, System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],WritePropertySpanAction`2[Char,Int32],WritePropertySpanAction`2[Byte,Int32])
           4 ( 0.17% of base) : 96331.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNullPropertyName_Simple(long,System.String,System.Action`3[[System.Text.Json.Utf8JsonWriter, System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int64, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],WritePropertySpanAction`2[Char,Int64],WritePropertySpanAction`2[Byte,Int64])
           4 ( 0.17% of base) : 96327.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNullPropertyName_Simple(short,System.String,System.Action`3[[System.Text.Json.Utf8JsonWriter, System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int16, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],WritePropertySpanAction`2[Char,Int16],WritePropertySpanAction`2[Byte,Int16])
           4 ( 0.17% of base) : 96330.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNullPropertyName_Simple(System.Numerics.Vector`1[Single],System.String,System.Action`3[[System.Text.Json.Utf8JsonWriter, System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Numerics.Vector`1[[System.Single, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],WritePropertySpanAction`2[Char,Vector`1],WritePropertySpanAction`2[Byte,Vector`1])
           4 ( 0.17% of base) : 96326.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNullPropertyName_Simple(ubyte,System.String,System.Action`3[[System.Text.Json.Utf8JsonWriter, System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Byte, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],WritePropertySpanAction`2[Char,Byte],WritePropertySpanAction`2[Byte,Byte])
           3 ( 0.25% of base) : 64828.dasm - <ReadIntegerAsync>d__44:MoveNext():this
           3 ( 0.76% of base) : 243587.dasm - Microsoft.CSharp.RuntimeBinder.Tests.IntegerBinaryOperationTests:GetBinaryOperationCallSite(int,bool,bool,bool):System.Runtime.CompilerServices.CallSite`1[[System.Func`4[[System.Runtime.CompilerServices.CallSite, System.Linq.Expressions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
           3 ( 0.35% of base) : 134014.dasm - Microsoft.Diagnostics.Runtime.Utilities.Pdb.PdbFile:LoadNameIndex(Microsoft.Diagnostics.Runtime.Utilities.Pdb.BitAccess,byref,byref,byref,byref):System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
           3 ( 0.38% of base) : 310728.dasm - System.Numerics.Tensors.IntArithmetic:UnaryMinus(System.Numerics.Tensors.DenseTensor`1[Int32],System.Numerics.Tensors.DenseTensor`1[Int32]):this
           3 ( 0.38% of base) : 310729.dasm - System.Numerics.Tensors.IntArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[Int32],System.Numerics.Tensors.DenseTensor`1[Int32]):this
           3 ( 0.38% of base) : 310786.dasm - System.Numerics.Tensors.LongArithmetic:UnaryMinus(System.Numerics.Tensors.DenseTensor`1[Int64],System.Numerics.Tensors.DenseTensor`1[Int64]):this
           3 ( 0.38% of base) : 310787.dasm - System.Numerics.Tensors.LongArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[Int64],System.Numerics.Tensors.DenseTensor`1[Int64]):this
           3 ( 0.38% of base) : 310903.dasm - System.Numerics.Tensors.ShortArithmetic:UnaryMinus(System.Numerics.Tensors.DenseTensor`1[Int16],System.Numerics.Tensors.DenseTensor`1[Int16]):this
           3 ( 0.38% of base) : 310904.dasm - System.Numerics.Tensors.ShortArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[Int16],System.Numerics.Tensors.DenseTensor`1[Int16]):this
           3 ( 0.38% of base) : 310962.dasm - System.Numerics.Tensors.UIntArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[UInt32],System.Numerics.Tensors.DenseTensor`1[UInt32]):this
           3 ( 0.38% of base) : 311019.dasm - System.Numerics.Tensors.ULongArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[UInt64],System.Numerics.Tensors.DenseTensor`1[UInt64]):this
           3 ( 0.38% of base) : 311075.dasm - System.Numerics.Tensors.UShortArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[UInt16],System.Numerics.Tensors.DenseTensor`1[UInt16]):this

Top method improvements (bytes):
        -281 (-14.20% of base) : 177036.dasm - System.SpanTests.IndexerTests:SlicingUsingIndexAndRangeTest()
        -221 (-3.40% of base) : 190968.dasm - System.Tests.StringTests:WhiteSpaceAtStartAndEndTrim_Memory()
        -221 (-3.40% of base) : 70414.dasm - System.Tests.StringTests:WhiteSpaceAtStartAndEndTrim_Memory()
        -190 (-5.94% of base) : 72384.dasm - System.Tests.Int16Tests:Parse_Valid(System.String,int,System.IFormatProvider,short)
        -190 (-5.94% of base) : 323359.dasm - System.Tests.Int16Tests:Parse_Valid(System.String,int,System.IFormatProvider,short)
        -190 (-5.89% of base) : 324023.dasm - System.Tests.Int16Tests_GenericMath:ParseValidStringTest(System.String,int,System.IFormatProvider,short)
        -190 (-5.94% of base) : 72653.dasm - System.Tests.SByteTests:Parse_Valid(System.String,int,System.IFormatProvider,byte)
        -190 (-5.94% of base) : 323445.dasm - System.Tests.SByteTests:Parse_Valid(System.String,int,System.IFormatProvider,byte)
        -190 (-5.89% of base) : 324379.dasm - System.Tests.SByteTests_GenericMath:ParseValidStringTest(System.String,int,System.IFormatProvider,byte)
        -189 (-3.06% of base) : 190966.dasm - System.Tests.StringTests:WhiteSpaceAtStartTrim_Memory()
        -189 (-3.06% of base) : 70412.dasm - System.Tests.StringTests:WhiteSpaceAtStartTrim_Memory()
        -187 (-6.20% of base) : 71347.dasm - System.Tests.ByteTests:Parse_Valid(System.String,int,System.IFormatProvider,ubyte)
        -187 (-6.20% of base) : 323182.dasm - System.Tests.ByteTests:Parse_Valid(System.String,int,System.IFormatProvider,ubyte)
        -184 (-5.96% of base) : 72989.dasm - System.Tests.UInt16Tests:Parse_Valid(System.String,int,System.IFormatProvider,ushort)
        -184 (-5.96% of base) : 323488.dasm - System.Tests.UInt16Tests:Parse_Valid(System.String,int,System.IFormatProvider,ushort)
        -183 (-6.00% of base) : 323580.dasm - System.Tests.ByteTests_GenericMath:ParseValidStringTest(System.String,int,System.IFormatProvider,ubyte)
        -182 (-6.01% of base) : 344431.dasm - XLinqTests.ParamsObjectsCreation:XDocumentAddParamsCloning():this
        -179 (-5.66% of base) : 324471.dasm - System.Tests.UInt16Tests_GenericMath:ParseValidStringTest(System.String,int,System.IFormatProvider,ushort)
        -172 (-6.16% of base) : 344430.dasm - XLinqTests.ParamsObjectsCreation:XDocumentAddParams():this
        -171 (-16.13% of base) : 176521.dasm - System.SpanTests.SpanTests:Overlap(int,int,int,int,bool)

Top method regressions (percentages):
         125 ( 3.13% of base) : 96241.dasm - System.Text.Json.Tests.Utf8JsonReaderTests:TestSingleStrings()
         112 ( 2.97% of base) : 96240.dasm - System.Text.Json.Tests.Utf8JsonReaderTests:TestPartialJsonReader(bool,int,System.String)
           3 ( 0.76% of base) : 243587.dasm - Microsoft.CSharp.RuntimeBinder.Tests.IntegerBinaryOperationTests:GetBinaryOperationCallSite(int,bool,bool,bool):System.Runtime.CompilerServices.CallSite`1[[System.Func`4[[System.Runtime.CompilerServices.CallSite, System.Linq.Expressions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
           3 ( 0.38% of base) : 310729.dasm - System.Numerics.Tensors.IntArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[Int32],System.Numerics.Tensors.DenseTensor`1[Int32]):this
           3 ( 0.38% of base) : 310962.dasm - System.Numerics.Tensors.UIntArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[UInt32],System.Numerics.Tensors.DenseTensor`1[UInt32]):this
           3 ( 0.38% of base) : 310787.dasm - System.Numerics.Tensors.LongArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[Int64],System.Numerics.Tensors.DenseTensor`1[Int64]):this
           3 ( 0.38% of base) : 311019.dasm - System.Numerics.Tensors.ULongArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[UInt64],System.Numerics.Tensors.DenseTensor`1[UInt64]):this
           3 ( 0.38% of base) : 310728.dasm - System.Numerics.Tensors.IntArithmetic:UnaryMinus(System.Numerics.Tensors.DenseTensor`1[Int32],System.Numerics.Tensors.DenseTensor`1[Int32]):this
           3 ( 0.38% of base) : 310904.dasm - System.Numerics.Tensors.ShortArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[Int16],System.Numerics.Tensors.DenseTensor`1[Int16]):this
           3 ( 0.38% of base) : 311075.dasm - System.Numerics.Tensors.UShortArithmetic:UnaryPlus(System.Numerics.Tensors.DenseTensor`1[UInt16],System.Numerics.Tensors.DenseTensor`1[UInt16]):this
           3 ( 0.38% of base) : 310786.dasm - System.Numerics.Tensors.LongArithmetic:UnaryMinus(System.Numerics.Tensors.DenseTensor`1[Int64],System.Numerics.Tensors.DenseTensor`1[Int64]):this
           3 ( 0.38% of base) : 310903.dasm - System.Numerics.Tensors.ShortArithmetic:UnaryMinus(System.Numerics.Tensors.DenseTensor`1[Int16],System.Numerics.Tensors.DenseTensor`1[Int16]):this
           3 ( 0.35% of base) : 134014.dasm - Microsoft.Diagnostics.Runtime.Utilities.Pdb.PdbFile:LoadNameIndex(Microsoft.Diagnostics.Runtime.Utilities.Pdb.BitAccess,byref,byref,byref,byref):System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
           3 ( 0.25% of base) : 64828.dasm - <ReadIntegerAsync>d__44:MoveNext():this
           3 ( 0.19% of base) : 196064.dasm - System.Security.Cryptography.Algorithms.Tests.AesCcmTests:ValidTagSize(int)
           3 ( 0.19% of base) : 196092.dasm - System.Security.Cryptography.Algorithms.Tests.AesGcmTests:ValidTagSize(int)
           3 ( 0.19% of base) : 196062.dasm - System.Security.Cryptography.Algorithms.Tests.AesCcmTests:ValidNonceSize(int)
           3 ( 0.19% of base) : 196090.dasm - System.Security.Cryptography.Algorithms.Tests.AesGcmTests:ValidNonceSize(int)
           4 ( 0.17% of base) : 96328.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNullPropertyName_Simple(int,System.String,System.Action`3[[System.Text.Json.Utf8JsonWriter, System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],WritePropertySpanAction`2[Char,Int32],WritePropertySpanAction`2[Byte,Int32])
           4 ( 0.17% of base) : 96331.dasm - System.Text.Json.Tests.Utf8JsonWriterTests:WriteNullPropertyName_Simple(long,System.String,System.Action`3[[System.Text.Json.Utf8JsonWriter, System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int64, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],WritePropertySpanAction`2[Char,Int64],WritePropertySpanAction`2[Byte,Int64])

Top method improvements (percentages):
         -11 (-33.33% of base) : 220423.dasm - System.Data.SqlClient.SqlInternalConnection:GetTransactionCookie(System.Transactions.Transaction,System.Byte[]):System.Byte[]
         -11 (-33.33% of base) : 216162.dasm - System.Data.SqlClient.SqlInternalConnection:GetTransactionCookie(System.Transactions.Transaction,System.Byte[]):System.Byte[]
         -81 (-26.30% of base) : 246487.dasm - <>c:<GetIncludeFiles>b__1_0(System.String):bool:this
         -39 (-25.66% of base) : 206073.dasm - <>c:<TestRunPerformance>b__15_1(System.IO.FileInfo):bool:this
         -39 (-25.66% of base) : 206074.dasm - <>c:<TestRunPerformance>b__15_2(System.IO.FileInfo):bool:this
         -75 (-25.34% of base) : 62558.dasm - <>c__DisplayClass16_0:<SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging>b__1(System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
         -77 (-25.08% of base) : 157898.dasm - <>c__DisplayClass7_0:<VerifyManifestAndRemoveFile>b__0(Microsoft.Diagnostics.Tracing.TraceEvent):this
         -39 (-25.00% of base) : 117239.dasm - <>c:<TryLoadTaskBody>b__21_1(System.Xml.Linq.XAttribute):bool:this
         -39 (-25.00% of base) : 117240.dasm - <>c:<TryLoadTaskBody>b__21_2(System.Xml.Linq.XAttribute):bool:this
        -161 (-25.00% of base) : 193779.dasm - SerializationTestTypes.UserTypeToPrimitiveTypeResolver:ResolveName(System.String,System.String,System.Type,System.Runtime.Serialization.DataContractResolver):System.Type:this
        -161 (-25.00% of base) : 66812.dasm - SerializationTestTypes.UserTypeToPrimitiveTypeResolver:ResolveName(System.String,System.String,System.Type,System.Runtime.Serialization.DataContractResolver):System.Type:this
          -8 (-25.00% of base) : 221773.dasm - TransactedConnectionList:Dispose():this
          -8 (-25.00% of base) : 217409.dasm - TransactedConnectionList:Dispose():this
        -140 (-24.96% of base) : 62538.dasm - <>c__DisplayClass8_0:<SendAsync_ExpectedDiagnosticSourceNoLogging>b__1(System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
         -39 (-24.68% of base) : 62533.dasm - <>c:<SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging>b__20_2(System.String):bool:this
         -39 (-24.68% of base) : 283502.dasm - <>c:<TestUserCredentialsPropertiesOnWindows>b__16_0(System.String):bool:this
        -145 (-24.41% of base) : 62564.dasm - <>c__DisplayClass19_0:<SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging>b__1(System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
         -39 (-23.78% of base) : 282644.dasm - <>c:<EventLogs_Get>b__8_1(System.Diagnostics.EventLog):bool:this
         -39 (-23.78% of base) : 282645.dasm - <>c:<EventLogs_Get>b__8_2(System.Diagnostics.EventLog):bool:this
         -39 (-23.78% of base) : 340982.dasm - <>c:<ForEachPLRTests>b__2_0(System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],System.Threading.Tasks.ParallelLoopState):this

8160 total methods with Code Size differences (8133 improved, 27 regressed), 10 unchanged.


I looked at a few of the bigger regressions and they all look like changes in RA spilling.

I used Kunal's asm screener from jitutils to check roughly how many cases of (setcc; movzx; test) remain and there are still some where the tree to substitute is too complex for this code to reason about (eg an array bounds check or call). Eg there were 700 or so in libraries pmi.

Many of those can be safely forward substituted but it requires knowing for instance that an SSA def has a single use, which we don't know right now.

In some ways this change is crying out for a general code motion safety checcker -- that is a utility that given a tree X and a desired location Y, tells us if it is safe/correct to move X to Y. Note I currently duplicate the tree, I don't move it (but we still need to check that the copy will evaluate to the same thing at its new location). I use heuristics to try ensure that if I copy the tree the original will end up being dead, and this seems to largely work out.

I think this optimization will also allow us to remove most of the ? true : false patterns that have crept into our code, but still need to verify this.

//
substituteTree->gtFlags |= (GTF_DONT_CSE | GTF_RELOP_JMP_USED);

gtReplaceTree(stmt, tree, substituteTree);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, gtReplaceTree was dead code before this change and as such is sort of in the process of being deleted (in #59912)...

It appears here we have the use edge, so maybe just replace the operand and resequence the statement explicitly? It should be a bit cheaper I think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just replace the operand and resequence the statement explicitly?

Sure.

@AndyAyersMS
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS
Copy link
Member Author

Looks like some issues in Regex -- going to run outerloop to see if any simpler tests get tripped up.

@AndyAyersMS
Copy link
Member Author

Interference check was broken, leading to an invalid fwd sub that broke regexp tests...

optRedundantRelop in BB19; jump tree is
N004 (  5,  5) [005065] ------------              *  JTRUE     void  
N003 (  3,  3) [005066] J------N----              \--*  NE        int    $636
N001 (  1,  1) [005067] ------------                 +--*  LCL_VAR   int    V03 loc0         u:3 (last use) $636
N002 (  1,  1) [005068] ------------                 \--*  CNS_INT   int    0 $40
 ... checking previous tree
N005 (  6,  3) [000091] -A------R---              *  ASG       int    $636
N004 (  1,  1) [000090] D------N----              +--*  LCL_VAR   int    V03 loc0         d:3 $636
N003 (  6,  3) [000089] ------------              \--*  EQ        int    $636
N001 (  1,  1) [000087] ------------                 +--*  LCL_VAR   int    V03 loc0         u:2 (last use) $140
N002 (  1,  1) [000088] ------------                 \--*  CNS_INT   int    0 $40
 -- prev tree has relop with the same liberal VN
 -- prev tree ref to V03 interferes
 -- prev tree is viable candidate for relop fwd sub!
 -- done! new jump tree is
N004 (  5,  5) [005065] ------------              *  JTRUE     void  
N003 (  6,  3) [005164] J------N----              \--*  EQ        int    $636
N001 (  1,  1) [005165] ------------                 +--*  LCL_VAR   int    V03 loc0         u:2 (last use) $140
N002 (  1,  1) [005166] ------------                 \--*  CNS_INT   int    0 $40

Comment on lines +811 to +815
if ((prevTree->gtFlags & GTF_SIDE_EFFECT) != (prevTree->gtFlags & (GTF_EXCEPT | GTF_ASG)))
{
JITDUMP(" -- prev tree has side effects\n");
break;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears we only keep track of locals assigned at the root.

Do we need to check (prevTreeRHS->gtFlags & GTF_ASG) == 0 to guard against nested definitions?

@AndyAyersMS
Copy link
Member Author

@dotnet/jit-contrib ping

Comment on lines +881 to +885
if (!domIsSameRelop && !domIsRevRelop)
{
JITDUMP(" -- prev tree VN is not related\n");
continue;
}
Copy link
Member

@jakobbotsch jakobbotsch Nov 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how this works. Doesn't this effectively make the interference check below useless? E.g.

Foo(3, 4);

void Foo(int a, int b)
{
  bool foo = a < b;
  a = 15;
  if (foo)
    Console.WriteLine(a);
  else
    Console.WriteLine(b);
}

15 does not have the same VN as a < b, so the assignment to a will be skipped in the interference check and the program will always print 4 when it should print 15.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we should be adding a to the interfering set here before continuing the search.

break;
}

// If the VN of RHS is the VN of the current tree, or is "related", consider foward sub.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo: foward

@@ -691,6 +692,307 @@ bool Compiler::optJumpThread(BasicBlock* const block, BasicBlock* const domBlock
return true;
}

//------------------------------------------------------------------------
// optRedundantRelop: see if the value of tree is redundant given earlier
// relops in this block.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be useful if you give an example here of the type of transformations done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one -- was that what you had in mind?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great! Much more detailed even than what I imagined :-)

@AndyAyersMS
Copy link
Member Author

No impact to SPMI from the various edits above.

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should run JitStress job before merging

@AndyAyersMS
Copy link
Member Author

/azp run runtime-coreclr jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS
Copy link
Member Author

CI seems to be having issues restoring packages

    Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.collections.immutable/index.json'.
    Response status code does not indicate success: 503 (Service Unavailable).

@jakobbotsch
Copy link
Member

Might be worth to run a fuzzer on this as well?

@jakobbotsch
Copy link
Member

/azp run Fuzzlyn

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jakobbotsch
Copy link
Member

I don't see anything that looks related in the Fuzzlyn runs.

@AndyAyersMS
Copy link
Member Author

Are the Fuzzlyn runs supposed to come back green, or are there "known failures"?

@jakobbotsch
Copy link
Member

Are the Fuzzlyn runs supposed to come back green, or are there "known failures"?

There are several known failures. Looks like there are a couple of new unknown ones I haven't seen before in this run as well, but I'm pretty sure those aren't related to this PR (one of them is an ARM32 NYI, the other one related to #61037).

@AndyAyersMS
Copy link
Member Author

Jitstress now green after rerunning a few build tasks that failed with CI issues. Per Jakob, Fuzzlyn failures seem unrelated.

@kunalspathak
Copy link
Member

windowsx86 improvements - dotnet/perf-autofiling-issues#2212

@kunalspathak
Copy link
Member

windows/x64 improvements - dotnet/perf-autofiling-issues#2224

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants