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

Allow contained indirections in tailcalls on x64 #58686

Merged
merged 5 commits into from
Sep 21, 2021

Conversation

jakobbotsch
Copy link
Member

This adds support for contained indirections in tailcalls on x64. The
significant diff of this change is refactoring to be able to reuse the
code for generating call instructions when generating tailcalls as well.
Other than that, the main change is to allow contained indirs in
lowering and to ensure LSRA uses volatile registers for the addressing
mode so that the registers are not overridden by the epilog sequence.

To be sure we insert rex. prefix correctly I also refactored the emitter
to base the decision on a new instruction (INS_i_jmp) and emit it when
necessary. The rex. prefix is necessary because the unwinder uses it to
determine that a tail jmp is non-local and thus part of the epilog.

Finally, unlike the OS unwinder our unwinder needs to compute the size
of the epilog. This computation was wrong for jmp [foo] for addressing
modes/rip-relative addressing, so fix this as well. Presumably that has
not been a problem before since we did not generate these instructions
in managed code (although native code may have had these instructions --
not sure if we use that unwinder for native code).

This PR helps support #56669.

This adds support for contained indirections in tailcalls on x64. The
significant diff of this change is refactoring to be able to reuse the
code for generating call instructions when generating tailcalls as well.
Other than that, the main change is to allow contained indirs in
lowering and to ensure LSRA uses volatile registers for the addressing
mode so that the registers are not overridden by the epilog sequence.

To be sure we insert rex. prefix correctly I also refactored the emitter
to base the decision on a new instruction (INS_i_jmp) and emit it when
necessary. The rex. prefix is necessary because the unwinder uses it to
determine that a tail jmp is non-local and thus part of the epilog.

Finally, unlike the OS unwinder our unwinder needs to compute the size
of the epilog. This computation was wrong for jmp [foo] for addressing
modes/rip-relative addressing, so fix this as well. Presumably that has
not been a problem before since we did not generate these instructions
in managed code (although native code may have had these instructions --
not sure if we use that unwinder for native code).

This PR helps support dotnet#56669.
@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 Sep 4, 2021
INST1(rex_jmp, "rex.jmp", IUM_RD, 0x0020FE, INS_FLAGS_None)
#endif

INST1(i_jmp, "jmp", IUM_RD, 0x0020FE, INS_FLAGS_None )
Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed that we have the wrong opcode for this and compensate for it in the emitter for some reason, so I have fixed this as well.

@jakobbotsch
Copy link
Member Author

SPMI diffs:

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


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 198855
Total bytes of diff: 193498
Total bytes of delta: -5357 (-2,69% of base)
    diff is an improvement.
Detail diffs


Top file regressions (bytes):
          37 : 40820.dasm (6,36% of base)
          19 : 27028.dasm (2,88% of base)
          14 : 20067.dasm (1,22% of base)
          11 : 19409.dasm (3,86% of base)
          10 : 20232.dasm (13,51% of base)
          10 : 35630.dasm (16,95% of base)
          10 : 40397.dasm (16,95% of base)
           9 : 20192.dasm (3,25% of base)
           9 : 20224.dasm (2,56% of base)
           7 : 11953.dasm (5,88% of base)
           7 : 16957.dasm (4,29% of base)
           7 : 19767.dasm (18,42% of base)
           7 : 41880.dasm (3,91% of base)
           7 : 41905.dasm (3,10% of base)
           7 : 22744.dasm (3,43% of base)
           7 : 22772.dasm (3,23% of base)
           7 : 43385.dasm (3,91% of base)
           7 : 43424.dasm (3,10% of base)
           7 : 27627.dasm (15,56% of base)
           7 : 31383.dasm (18,42% of base)

Top file improvements (bytes):
         -79 : 27750.dasm (-3,50% of base)
         -78 : 20396.dasm (-4,18% of base)
         -33 : 27749.dasm (-4,35% of base)
         -31 : 40521.dasm (-4,29% of base)
         -19 : 31145.dasm (-12,67% of base)
         -18 : 31466.dasm (-7,56% of base)
         -18 : 31475.dasm (-7,56% of base)
         -18 : 40459.dasm (-1,88% of base)
         -18 : 40499.dasm (-2,26% of base)
         -16 : 43198.dasm (-4,40% of base)
         -15 : 31486.dasm (-3,36% of base)
         -15 : 22331.dasm (-3,36% of base)
         -12 : 19230.dasm (-0,87% of base)
         -12 : 40725.dasm (-0,86% of base)
         -11 : 14832.dasm (-7,19% of base)
         -11 : 15141.dasm (-3,86% of base)
         -11 : 16945.dasm (-5,34% of base)
         -11 : 39822.dasm (-7,19% of base)
         -11 : 39642.dasm (-4,91% of base)
         -11 : 41197.dasm (-5,67% of base)

1311 total files with Code Size differences (1281 improved, 30 regressed), 9 unchanged.

Top method regressions (bytes):
          37 ( 6,36% of base) : 40820.dasm - <>c__DisplayClass7_0:<CreateActivator>b__0(ControllerContext):Object:this
          19 ( 2,88% of base) : 27028.dasm - <>c__DisplayClass7_0:<CreateActivator>b__0(ControllerContext):Object:this
          14 ( 1,22% of base) : 20067.dasm - ReducingExpressionVisitor:Visit(Expression):Expression:this
          11 ( 3,86% of base) : 19409.dasm - ModelValidator:Validate(IModel,IDiagnosticsLogger`1):this
          10 (13,51% of base) : 20232.dasm - RelationalValueConverterCompensatingExpressionVisitor:VisitShapedQueryExpression(ShapedQueryExpression):Expression:this
          10 (16,95% of base) : 35630.dasm - RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this
          10 (16,95% of base) : 40397.dasm - RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this
           9 ( 3,25% of base) : 20192.dasm - SelectExpressionProjectionApplyingExpressionVisitor:VisitExtension(Expression):Expression:this
           9 ( 2,56% of base) : 20224.dasm - SelectExpressionPruningExpressionVisitor:Visit(Expression):Expression:this
           7 ( 5,88% of base) : 11953.dasm - Log:Proxying(ILogger,Uri)
           7 ( 4,29% of base) : 16957.dasm - Log:Proxying(ILogger,Uri)
           7 (18,42% of base) : 19767.dasm - RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this
           7 ( 3,91% of base) : 41880.dasm - AsyncOperation`1:SetCompletionAndInvokeContinuation():this
           7 ( 3,10% of base) : 41905.dasm - AsyncOperation`1:SetCompletionAndInvokeContinuation():this
           7 ( 3,43% of base) : 22744.dasm - AsyncOperation`1:SetCompletionAndInvokeContinuation():this
           7 ( 3,23% of base) : 22772.dasm - AsyncOperation`1:SetCompletionAndInvokeContinuation():this
           7 ( 3,91% of base) : 43385.dasm - AsyncOperation`1:SetCompletionAndInvokeContinuation():this
           7 ( 3,10% of base) : 43424.dasm - AsyncOperation`1:SetCompletionAndInvokeContinuation():this
           7 (15,56% of base) : 27627.dasm - <>c__DisplayClass7_0:<CreateActivator>b__0(ControllerContext):Object:this
           7 (18,42% of base) : 31383.dasm - RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this

Top method improvements (bytes):
         -79 (-3,50% of base) : 27750.dasm - SqlMapper:LoadReaderValueOrBranchToDBNullLabel(ILGenerator,int,byref,LocalBuilder,Type,Type,byref)
         -78 (-4,18% of base) : 20396.dasm - SqlExpressionVisitor:VisitExtension(Expression):Expression:this
         -33 (-4,35% of base) : 27749.dasm - SqlMapper:EmitInt32(ILGenerator,int)
         -31 (-4,29% of base) : 40521.dasm - CallSiteVisitor`2:VisitCallSiteMain(ServiceCallSite,__Canon):__Canon:this
         -19 (-12,67% of base) : 31145.dasm - Hashtable:KeyEquals(Object,Object):bool:this
         -18 (-7,56% of base) : 31466.dasm - ILEmitResolverBuilder:Ldloc(ILGenerator,int):this
         -18 (-7,56% of base) : 31475.dasm - ILEmitResolverBuilder:Stloc(ILGenerator,int):this
         -18 (-1,88% of base) : 40459.dasm - ILEmitResolverBuilder:Ldloc(ILGenerator,int):this
         -18 (-2,26% of base) : 40499.dasm - ILEmitResolverBuilder:Stloc(ILGenerator,int):this
         -16 (-4,40% of base) : 43198.dasm - NpgsqlDataReader:GetFieldType(int):Type:this
         -15 (-3,36% of base) : 31486.dasm - CallSiteVisitor`2:VisitCallSiteMain(ServiceCallSite,__Canon):__Canon:this
         -15 (-3,36% of base) : 22331.dasm - CallSiteVisitor`2:VisitCallSiteMain(ServiceCallSite,RuntimeResolverContext):__Canon:this
         -12 (-0,87% of base) : 19230.dasm - StoreGenerationConvention:ProcessPropertyAnnotationChanged(IConventionPropertyBuilder,String,IConventionAnnotation,IConventionAnnotation,IConventionContext`1):this
         -12 (-0,86% of base) : 40725.dasm - SaveTempDataFilter:OnResourceExecuting(ResourceExecutingContext):this
         -11 (-7,19% of base) : 14832.dasm - ThreadPoolWorkQueue:DispatchWorkItem(Object,Thread)
         -11 (-3,86% of base) : 15141.dasm - <>c:<.cctor>b__179_0(int,int,long):this
         -11 (-5,34% of base) : 16945.dasm - DefaultHttpRequest:get_Scheme():String:this
         -11 (-7,19% of base) : 39822.dasm - ThreadPoolWorkQueue:DispatchWorkItem(Object,Thread)
         -11 (-4,91% of base) : 39642.dasm - NumberFormatInfo:GetInstance(IFormatProvider):NumberFormatInfo
         -11 (-5,67% of base) : 41197.dasm - Convert:ToString(Object,IFormatProvider):String

Top method regressions (percentages):
           7 (18,42% of base) : 19767.dasm - RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this
           7 (18,42% of base) : 31383.dasm - RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this
          10 (16,95% of base) : 35630.dasm - RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this
          10 (16,95% of base) : 40397.dasm - RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this
           7 (15,56% of base) : 27627.dasm - <>c__DisplayClass7_0:<CreateActivator>b__0(ControllerContext):Object:this
          10 (13,51% of base) : 20232.dasm - RelationalValueConverterCompensatingExpressionVisitor:VisitShapedQueryExpression(ShapedQueryExpression):Expression:this
          37 ( 6,36% of base) : 40820.dasm - <>c__DisplayClass7_0:<CreateActivator>b__0(ControllerContext):Object:this
           7 ( 5,88% of base) : 11953.dasm - Log:Proxying(ILogger,Uri)
           7 ( 5,88% of base) : 17725.dasm - Log:Proxying(ILogger,Uri)
           4 ( 4,71% of base) : 32079.dasm - RazorPageBase:CreateTagHelper():__Canon:this
           5 ( 4,50% of base) : 7972.dasm - QueueUserWorkItemCallback`1:Execute():this
           5 ( 4,39% of base) : 18740.dasm - RelationalQueryFilterRewritingConvention:.ctor(ProviderConventionSetBuilderDependencies,RelationalConventionSetBuilderDependencies):this
           7 ( 4,29% of base) : 16957.dasm - Log:Proxying(ILogger,Uri)
           7 ( 3,91% of base) : 41880.dasm - AsyncOperation`1:SetCompletionAndInvokeContinuation():this
           7 ( 3,91% of base) : 43385.dasm - AsyncOperation`1:SetCompletionAndInvokeContinuation():this
           3 ( 3,90% of base) : 18477.dasm - ClrPropertySetter`2:SetClrValue(Object,Object):this
           3 ( 3,90% of base) : 31283.dasm - ClrPropertySetter`2:SetClrValue(Object,Object):this
          11 ( 3,86% of base) : 19409.dasm - ModelValidator:Validate(IModel,IDiagnosticsLogger`1):this
           7 ( 3,43% of base) : 22744.dasm - AsyncOperation`1:SetCompletionAndInvokeContinuation():this
           9 ( 3,25% of base) : 20192.dasm - SelectExpressionProjectionApplyingExpressionVisitor:VisitExtension(Expression):Expression:this

Top method improvements (percentages):
          -4 (-40,00% of base) : 19218.dasm - <FindRowInternalForeignKeys>d__53:System.Collections.IEnumerable.GetEnumerator():IEnumerator:this
          -4 (-40,00% of base) : 41666.dasm - HttpResponseStreamWriter:<>n__0():ValueTask:this
          -4 (-40,00% of base) : 19113.dasm - <GetAllBaseTypesInclusiveAscending>d__17:System.Collections.IEnumerable.GetEnumerator():IEnumerator:this
          -4 (-40,00% of base) : 15371.dasm - StructuredTransformer:<>n__2(HttpContext,HttpResponseMessage):ValueTask:this
          -4 (-40,00% of base) : 15692.dasm - StructuredTransformer:<>n__1(HttpContext,HttpResponseMessage):ValueTask`1:this
          -4 (-40,00% of base) : 42041.dasm - SslStream:<>n__0():ValueTask:this
          -4 (-40,00% of base) : 7651.dasm - StateMachineBox`1:System.Threading.IThreadPoolWorkItem.Execute():this
          -4 (-40,00% of base) : 18192.dasm - StateMachineBox`1:System.Threading.IThreadPoolWorkItem.Execute():this
          -4 (-33,33% of base) : 27753.dasm - NpgsqlDataReader:get_Item(int):Object:this
          -4 (-33,33% of base) : 24351.dasm - NpgsqlDataReader:get_Item(int):Object:this
          -4 (-33,33% of base) : 22412.dasm - NpgsqlDataReader:get_Item(int):Object:this
          -4 (-33,33% of base) : 43139.dasm - NpgsqlDataReader:get_Item(int):Object:this
          -4 (-26,67% of base) : 10553.dasm - BufferedFileStreamStrategy:DisposeInternal(bool):this
          -4 (-25,00% of base) : 35879.dasm - IndentedStringBuilder:ToString():String:this
          -4 (-25,00% of base) : 10367.dasm - PhysicalFileInfo:get_Exists():bool:this
          -4 (-25,00% of base) : 12002.dasm - DestinationHealthUpdater:Dispose():this
          -4 (-25,00% of base) : 41017.dasm - IndentedStringBuilder:ToString():String:this
          -4 (-25,00% of base) : 32318.dasm - ConnectorTypeMapper:TryGetByOID(int,byref):bool:this
          -4 (-25,00% of base) : 7354.dasm - PhysicalFileInfo:get_Exists():bool:this
          -4 (-25,00% of base) : 11999.dasm - ActiveHealthCheckMonitor:Dispose():this

1311 total methods with Code Size differences (1281 improved, 30 regressed), 9 unchanged.


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


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 148557
Total bytes of diff: 144560
Total bytes of delta: -3997 (-2,69% of base)
    diff is an improvement.
Detail diffs


Top file regressions (bytes):
          61 : 15299.dasm (5,98% of base)
          49 : 11932.dasm (11,78% of base)
          29 : 9099.dasm (12,08% of base)
          27 : 10193.dasm (13,99% of base)
          12 : 13601.dasm (2,16% of base)
          11 : 7890.dasm (5,47% of base)
          10 : 10952.dasm (14,29% of base)
          10 : 10942.dasm (14,29% of base)
          10 : 23087.dasm (4,81% of base)
          10 : 23088.dasm (5,88% of base)
           9 : 10547.dasm (8,04% of base)
           8 : 1527.dasm (20,51% of base)
           8 : 15176.dasm (21,05% of base)
           7 : 14666.dasm (14,58% of base)
           7 : 9204.dasm (4,83% of base)
           7 : 927.dasm (5,51% of base)
           7 : 6698.dasm (3,23% of base)
           5 : 11333.dasm (0,33% of base)
           5 : 16874.dasm (6,94% of base)
           5 : 19834.dasm (1,92% of base)

Top file improvements (bytes):
         -69 : 3302.dasm (-2,61% of base)
         -33 : 6925.dasm (-4,24% of base)
         -33 : 20065.dasm (-6,11% of base)
         -33 : 2483.dasm (-4,24% of base)
         -33 : 1553.dasm (-3,48% of base)
         -32 : 1496.dasm (-4,08% of base)
         -24 : 18604.dasm (-5,80% of base)
         -18 : 2581.dasm (-6,10% of base)
         -18 : 2582.dasm (-6,10% of base)
         -18 : 6910.dasm (-6,29% of base)
         -18 : 6918.dasm (-6,10% of base)
         -18 : 6935.dasm (-6,10% of base)
         -18 : 9530.dasm (-11,69% of base)
         -18 : 1512.dasm (-3,67% of base)
         -18 : 2413.dasm (-6,29% of base)
         -15 : 20074.dasm (-3,36% of base)
         -15 : 10648.dasm (-1,45% of base)
         -15 : 3826.dasm (-3,36% of base)
         -15 : 10591.dasm (-2,10% of base)
         -14 : 1997.dasm (-12,28% of base)

1136 total files with Code Size differences (1106 improved, 30 regressed), 7 unchanged.

Top method regressions (bytes):
          61 ( 5,98% of base) : 15299.dasm - DynamicClass:_DynamicMethod2(System.IO.TextWriter,MicroBenchmarks.Serializers.MyEventsListerViewModel,int)
          49 (11,78% of base) : 11932.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.Location,int)
          29 (12,08% of base) : 9099.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.LoginViewModel,int)
          27 (13,99% of base) : 10193.dasm - System.Threading.Tasks.ValueTask`1[__Canon][System.__Canon]:get_Result():System.__Canon:this
          12 ( 2,16% of base) : 13601.dasm - BenchmarksGame.Fasta_2:MakeRepeatFasta(System.String,System.String,System.Byte[],int,System.IO.Stream)
          11 ( 5,47% of base) : 7890.dasm - System.Xml.XmlUTF8NodeWriter:WriteXmlnsAttribute(System.String,System.String):this
          10 (14,29% of base) : 10952.dasm - <>c:<NotifyActivityStop>b__25_0(System.Diagnostics.ActivityListener,System.Object):this
          10 (14,29% of base) : 10942.dasm - <>c:<NotifyActivityStart>b__24_0(System.Diagnostics.ActivityListener,System.Object):this
          10 ( 4,81% of base) : 23087.dasm - ReadWriteTask:System.Threading.Tasks.ITaskCompletionAction.Invoke(System.Threading.Tasks.Task):this
          10 ( 5,88% of base) : 23088.dasm - ReadWriteTask:InvokeAsyncCallback(System.Object)
           9 ( 8,04% of base) : 10547.dasm - System.Linq.Expressions.ExpressionVisitor:VisitMethodCall(System.Linq.Expressions.MethodCallExpression):System.Linq.Expressions.Expression:this
           8 (20,51% of base) : 1527.dasm - <>c__DisplayClass2_0`3[__Canon,__Canon,__Canon][System.__Canon,System.__Canon,System.__Canon]:<CombineSelectors>b__0(System.__Canon):System.__Canon:this
           8 (21,05% of base) : 15176.dasm - <>c__DisplayClass2_0`3[Int32,Int32,Byte][System.Int32,System.Int32,System.Byte]:<CombineSelectors>b__0(int):ubyte:this
           7 (14,58% of base) : 14666.dasm - <>c__DisplayClass33_0`2[__Canon,__Canon][System.__Canon,System.__Canon]:<ForEachWorker>b__0(int):this
           7 ( 4,83% of base) : 9204.dasm - Jil.Deserialize.NameAutomata`1[Int32][System.Int32]:FinishName(Data`1[Int32,Int32],AutomataName[Int32],Sigil.Label)
           7 ( 5,51% of base) : 927.dasm - System.AppContext:OnProcessExit()
           7 ( 3,23% of base) : 6698.dasm - System.Threading.Channels.AsyncOperation`1[Int32][System.Int32]:SetCompletionAndInvokeContinuation():this
           5 ( 0,33% of base) : 11333.dasm - DynamicClass:proto_9(byref,MicroBenchmarks.Serializers.CampaignSummaryViewModel)
           5 ( 6,94% of base) : 16874.dasm - System.Reflection.Internal.MemoryBlockProvider:GetMemoryBlock(int,int):System.Reflection.Internal.AbstractMemoryBlock:this
           5 ( 1,92% of base) : 19834.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbolExtensions:GetNextBaseTypeNoUseSiteDiagnostics(Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol,Roslyn.Utilities.ConsList`1[[Microsoft.CodeAnalysis.CSharp.Symbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.CodeAnalysis.CSharp.CSharpCompilation,byref):Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol

Top method improvements (bytes):
         -69 (-2,61% of base) : 3302.dasm - System.Reflection.Emit.CustomAttributeBuilder:EmitValue(System.IO.BinaryWriter,System.Type,System.Object)
         -33 (-4,24% of base) : 6925.dasm - MessagePack.Internal.ILGeneratorExtensions:EmitLdc_I4(System.Reflection.Emit.ILGenerator,int)
         -33 (-6,11% of base) : 20065.dasm - System.Linq.Expressions.Compiler.ILGen:EmitLoadElement(System.Reflection.Emit.ILGenerator,System.Type)
         -33 (-4,24% of base) : 2483.dasm - Utf8Json.Internal.Emit.ILGeneratorExtensions:EmitLdc_I4(System.Reflection.Emit.ILGenerator,int)
         -33 (-3,48% of base) : 1553.dasm - ProtoBuf.Compiler.CompilerContext:LoadValue(int):this
         -32 (-4,08% of base) : 1496.dasm - ProtoBuf.Compiler.CompilerContext:LoadValue(ProtoBuf.Compiler.Local):this
         -24 (-5,80% of base) : 18604.dasm - Microsoft.Cci.MetadataVisitor:DispatchAsReference(Microsoft.Cci.ITypeReference):this
         -18 (-6,10% of base) : 2581.dasm - Utf8Json.Internal.Emit.ILGeneratorExtensions:EmitStloc(System.Reflection.Emit.ILGenerator,int)
         -18 (-6,10% of base) : 2582.dasm - Utf8Json.Internal.Emit.ILGeneratorExtensions:EmitLdloc(System.Reflection.Emit.ILGenerator,int)
         -18 (-6,29% of base) : 6910.dasm - MessagePack.Internal.ILGeneratorExtensions:EmitLdarg(System.Reflection.Emit.ILGenerator,int)
         -18 (-6,10% of base) : 6918.dasm - MessagePack.Internal.ILGeneratorExtensions:EmitStloc(System.Reflection.Emit.ILGenerator,int)
         -18 (-6,10% of base) : 6935.dasm - MessagePack.Internal.ILGeneratorExtensions:EmitLdloc(System.Reflection.Emit.ILGenerator,int)
         -18 (-11,69% of base) : 9530.dasm - System.Array:BinarySearch(System.__Canon[],int,int,System.__Canon,System.Collections.Generic.IComparer`1[__Canon]):int
         -18 (-3,67% of base) : 1512.dasm - ProtoBuf.Compiler.CompilerContext:StoreValue(ProtoBuf.Compiler.Local):this
         -18 (-6,29% of base) : 2413.dasm - Utf8Json.Internal.Emit.ILGeneratorExtensions:EmitLdarg(System.Reflection.Emit.ILGenerator,int)
         -15 (-3,36% of base) : 20074.dasm - Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[__Canon,__Canon][System.__Canon,System.__Canon]:VisitCallSiteMain(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite,System.__Canon):System.__Canon:this
         -15 (-1,45% of base) : 10648.dasm - Jil.Serialize.Methods:_CustomWriteIntUnrolledSigned(System.IO.TextWriter,int,System.Char[])
         -15 (-3,36% of base) : 3826.dasm - Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[RuntimeResolverContext,__Canon][Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext,System.__Canon]:VisitCallSiteMain(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite,Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext):System.__Canon:this
         -15 (-2,10% of base) : 10591.dasm - System.Linq.Expressions.Compiler.ILGen:EmitDefault(System.Reflection.Emit.ILGenerator,System.Type,System.Linq.Expressions.Compiler.ILocalCache)
         -14 (-12,28% of base) : 1997.dasm - System.Collections.Generic.EnumerableHelpers:Copy(System.Collections.Generic.IEnumerable`1[__Canon],System.__Canon[],int,int)

Top method regressions (percentages):
           8 (21,05% of base) : 15176.dasm - <>c__DisplayClass2_0`3[Int32,Int32,Byte][System.Int32,System.Int32,System.Byte]:<CombineSelectors>b__0(int):ubyte:this
           8 (20,51% of base) : 1527.dasm - <>c__DisplayClass2_0`3[__Canon,__Canon,__Canon][System.__Canon,System.__Canon,System.__Canon]:<CombineSelectors>b__0(System.__Canon):System.__Canon:this
           7 (14,58% of base) : 14666.dasm - <>c__DisplayClass33_0`2[__Canon,__Canon][System.__Canon,System.__Canon]:<ForEachWorker>b__0(int):this
          10 (14,29% of base) : 10952.dasm - <>c:<NotifyActivityStop>b__25_0(System.Diagnostics.ActivityListener,System.Object):this
          10 (14,29% of base) : 10942.dasm - <>c:<NotifyActivityStart>b__24_0(System.Diagnostics.ActivityListener,System.Object):this
          27 (13,99% of base) : 10193.dasm - System.Threading.Tasks.ValueTask`1[__Canon][System.__Canon]:get_Result():System.__Canon:this
          29 (12,08% of base) : 9099.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.LoginViewModel,int)
          49 (11,78% of base) : 11932.dasm - DynamicClass:_DynamicMethod0(System.IO.TextWriter,MicroBenchmarks.Serializers.Location,int)
           9 ( 8,04% of base) : 10547.dasm - System.Linq.Expressions.ExpressionVisitor:VisitMethodCall(System.Linq.Expressions.MethodCallExpression):System.Linq.Expressions.Expression:this
           4 ( 7,41% of base) : 18910.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol:get_IsMetadataAbstract():bool:this
           4 ( 7,41% of base) : 18912.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol:get_IsMetadataSealed():bool:this
           4 ( 7,02% of base) : 17777.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol:get_IsImplicitlyDeclared():bool:this
           4 ( 7,02% of base) : 6750.dasm - System.Xml.XmlReader:Dispose(bool):this
           5 ( 6,94% of base) : 16874.dasm - System.Reflection.Internal.MemoryBlockProvider:GetMemoryBlock(int,int):System.Reflection.Internal.AbstractMemoryBlock:this
          61 ( 5,98% of base) : 15299.dasm - DynamicClass:_DynamicMethod2(System.IO.TextWriter,MicroBenchmarks.Serializers.MyEventsListerViewModel,int)
          10 ( 5,88% of base) : 23088.dasm - ReadWriteTask:InvokeAsyncCallback(System.Object)
           7 ( 5,51% of base) : 927.dasm - System.AppContext:OnProcessExit()
          11 ( 5,47% of base) : 7890.dasm - System.Xml.XmlUTF8NodeWriter:WriteXmlnsAttribute(System.String,System.String):this
           7 ( 4,83% of base) : 9204.dasm - Jil.Deserialize.NameAutomata`1[Int32][System.Int32]:FinishName(Data`1[Int32,Int32],AutomataName[Int32],Sigil.Label)
          10 ( 4,81% of base) : 23087.dasm - ReadWriteTask:System.Threading.Tasks.ITaskCompletionAction.Invoke(System.Threading.Tasks.Task):this

Top method improvements (percentages):
          -4 (-40,00% of base) : 9817.dasm - StateMachineBox`1[VoidTaskResult,<WriteAsyncSlowPath>d__50][System.Threading.Tasks.VoidTaskResult,System.IO.Strategies.BufferedFileStreamStrategy+<WriteAsyncSlowPath>d__50]:System.Threading.IThreadPoolWorkItem.Execute():this
          -4 (-40,00% of base) : 12238.dasm - <ByteAddresses>d__0:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 7363.dasm - Enumerator:System.Collections.IEnumerator.get_Current():System.Object:this
          -4 (-40,00% of base) : 17861.dasm - Microsoft.CodeAnalysis.CSharp.LocalBinderFactory:DefaultVisit(Microsoft.CodeAnalysis.SyntaxNode):this
          -4 (-40,00% of base) : 19691.dasm - <DescendantNodesOnly>d__167:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 11702.dasm - AwaitableSocketAsyncEventArgs:UnsafeOnCompleted(System.Action):this
          -4 (-40,00% of base) : 12171.dasm - Microsoft.Win32.SafeHandles.SafeMemoryMappedFileHandle:get_IsInvalid():bool:this
          -4 (-40,00% of base) : 4188.dasm - Iterator`1[__Canon][System.__Canon]:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-33,33% of base) : 7369.dasm - System.Runtime.Serialization.Json.XmlJsonWriter:WriteValue(System.String):this
          -4 (-26,67% of base) : 21303.dasm - <>c:<Setup>b__11_11(System.AlignedMemory):System.Memory`1[Byte]:this
          -4 (-26,67% of base) : 4785.dasm - System.IO.Strategies.BufferedFileStreamStrategy:DisposeInternal(bool):this
          -4 (-26,67% of base) : 19944.dasm - <>c:<Normalize>b__48_0(Microsoft.CodeAnalysis.CSharp.Symbol):bool:this
          -4 (-25,00% of base) : 15389.dasm - System.Collections.Concurrent.Count`1[Int32][System.Int32]:Stack():int:this
          -4 (-25,00% of base) : 19245.dasm - System.Collections.Concurrent.Count`1[Int32][System.Int32]:Bag():int:this
          -4 (-25,00% of base) : 20083.dasm - Microsoft.Extensions.DependencyInjection.ActivatorUtilitiesBenchmark:Cleanup():this
          -4 (-25,00% of base) : 20131.dasm - System.Collections.Concurrent.Count`1[__Canon][System.__Canon]:Dictionary():int:this
          -4 (-25,00% of base) : 22561.dasm - System.Collections.Concurrent.Count`1[__Canon][System.__Canon]:Bag():int:this
          -4 (-25,00% of base) : 5032.dasm - System.IO.Pipes.Tests.Perf_PipeTest:Cleanup():this
          -4 (-25,00% of base) : 9506.dasm - System.Collections.Concurrent.AddRemoveFromSameThreads`1[Int32][System.Int32]:IterationCleanup():this
          -4 (-25,00% of base) : 13211.dasm - System.Runtime.Serialization.XmlDataContract:get_KnownDataContracts():System.Collections.Generic.Dictionary`2[[System.Xml.XmlQualifiedName, System.Private.Xml, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51],[System.Runtime.Serialization.DataContract, System.Private.DataContractSerialization, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]]:this

1136 total methods with Code Size differences (1106 improved, 30 regressed), 7 unchanged.


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


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 263212
Total bytes of diff: 257896
Total bytes of delta: -5316 (-2,02% of base)
    diff is an improvement.
Detail diffs


Top file regressions (bytes):
          14 : 197.dasm (6,39% of base)
          12 : 86393.dasm (14,29% of base)
          10 : 84133.dasm (9,52% of base)
           9 : 163868.dasm (9,78% of base)
           9 : 221729.dasm (1,55% of base)
           7 : 82420.dasm (87,50% of base)
           7 : 234270.dasm (4,07% of base)
           7 : 234273.dasm (8,97% of base)
           7 : 215281.dasm (4,90% of base)
           7 : 215282.dasm (4,40% of base)
           7 : 216834.dasm (87,50% of base)
           7 : 215280.dasm (5,19% of base)
           7 : 230973.dasm (6,73% of base)
           5 : 82150.dasm (6,94% of base)
           5 : 163887.dasm (2,84% of base)
           5 : 163892.dasm (2,84% of base)
           5 : 163896.dasm (2,84% of base)
           5 : 163898.dasm (2,84% of base)
           5 : 163900.dasm (2,79% of base)
           5 : 163904.dasm (2,84% of base)

Top file improvements (bytes):
         -68 : 177816.dasm (-6,18% of base)
         -40 : 81078.dasm (-3,57% of base)
         -21 : 163883.dasm (-3,69% of base)
         -18 : 177790.dasm (-1,40% of base)
         -17 : 164573.dasm (-4,82% of base)
          -9 : 163884.dasm (-5,92% of base)
          -6 : 103853.dasm (-4,20% of base)
          -6 : 106132.dasm (-4,20% of base)
          -6 : 106185.dasm (-4,20% of base)
          -6 : 107250.dasm (-4,20% of base)
          -6 : 107283.dasm (-4,11% of base)
          -6 : 114145.dasm (-4,08% of base)
          -6 : 115841.dasm (-4,20% of base)
          -6 : 115865.dasm (-4,20% of base)
          -6 : 115931.dasm (-4,11% of base)
          -6 : 11769.dasm (-4,08% of base)
          -6 : 118450.dasm (-4,20% of base)
          -6 : 118524.dasm (-4,08% of base)
          -6 : 120180.dasm (-4,11% of base)
          -6 : 126075.dasm (-4,20% of base)

1978 total files with Code Size differences (1585 improved, 393 regressed), 83 unchanged.

Top method regressions (bytes):
          14 ( 6,39% of base) : 197.dasm - System.Diagnostics.Process:ErrorReadNotifyUser(System.String):this
          12 (14,29% of base) : 86393.dasm - Client:method2():this
          10 ( 9,52% of base) : 84133.dasm - TestCase:Test(TestCase,bool,bool):this
           9 ( 9,78% of base) : 163868.dasm - Internal.TypeSystem.TypeSystemHelpers:GetFullName(Internal.TypeSystem.DefType):System.String
           9 ( 1,55% of base) : 221729.dasm - BenchmarksGame.Fasta_2:MakeRepeatFasta(System.String,System.String,System.Byte[],int,System.IO.Stream)
           7 (87,50% of base) : 82420.dasm - test:bar(long,int):int
           7 ( 4,07% of base) : 234270.dasm - Avalon.Secure.Foo:FooMethod(System.Object,System.EventArgs)
           7 ( 8,97% of base) : 234273.dasm - Avalon.Secure.Bar:OnBarEvent():this
           7 ( 4,90% of base) : 215281.dasm - <>c__DisplayClass11_0:<SyncBlkVariants>b__1(MonEnterTests+Action`1[[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
           7 ( 4,40% of base) : 215282.dasm - <>c__DisplayClass11_0:<SyncBlkVariants>b__2(MonEnterTests+Action`1[[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
           7 (87,50% of base) : 216834.dasm - Thread_EA:Dispatch(long,int)
           7 ( 5,19% of base) : 215280.dasm - <>c__DisplayClass11_0:<SyncBlkVariants>b__0(MonEnterTests+Action`1[[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
           7 ( 6,73% of base) : 230973.dasm - FtnTestsType:LdvirtFtn.VirtInstanceMethod_Valid(TestClass)
           5 ( 6,94% of base) : 82150.dasm - System.Reflection.Internal.MemoryBlockProvider:GetMemoryBlock(int,int):System.Reflection.Internal.AbstractMemoryBlock:this
           5 ( 2,84% of base) : 163887.dasm - Internal.TypeSystem.TypeNameFormatter`2[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):System.__Canon:this
           5 ( 2,84% of base) : 163892.dasm - Internal.TypeSystem.TypeNameFormatter`2[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):ubyte:this
           5 ( 2,84% of base) : 163896.dasm - Internal.TypeSystem.TypeNameFormatter`2[Int16,Nullable`1][System.Int16,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):short:this
           5 ( 2,84% of base) : 163898.dasm - Internal.TypeSystem.TypeNameFormatter`2[Int32,Nullable`1][System.Int32,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):int:this
           5 ( 2,79% of base) : 163900.dasm - Internal.TypeSystem.TypeNameFormatter`2[Double,Nullable`1][System.Double,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):double:this
           5 ( 2,84% of base) : 163904.dasm - Internal.TypeSystem.TypeNameFormatter`2[Int64,Nullable`1][System.Int64,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):long:this

Top method improvements (bytes):
         -68 (-6,18% of base) : 177816.dasm - ABIStress.Program:GetDelegateType(System.Collections.Generic.List`1[[ABIStress.TypeEx, pinvokes_do, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]],System.Type):System.Type
         -40 (-3,57% of base) : 81078.dasm - $:gg(int,jb,jb):jb
         -21 (-3,69% of base) : 163883.dasm - Internal.TypeSystem.TypeNameFormatter:AppendName(System.Text.StringBuilder,Internal.TypeSystem.TypeDesc):this
         -18 (-1,40% of base) : 177790.dasm - ABIStress.ConstantValue:EmitLoadPrimitive(System.Reflection.Emit.ILGenerator,System.Object)
         -17 (-4,82% of base) : 164573.dasm - ILVerify.TypeSystemHelpers:GetReducedType(Internal.TypeSystem.TypeDesc):Internal.TypeSystem.TypeDesc
          -9 (-5,92% of base) : 163884.dasm - Internal.TypeSystem.TypeNameFormatter:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType):this
          -6 (-4,20% of base) : 103853.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Single,Single,Single],System.Single[],System.Single[],int):float
          -6 (-4,20% of base) : 106132.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Double,Double,Double],System.Double[],System.Double[],int):double
          -6 (-4,20% of base) : 106185.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Int64,Int64,Int64],System.Int64[],System.Int64[],int):long
          -6 (-4,20% of base) : 107250.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Int64,Int64,Int64],System.Int64[],System.Int64[],int):long
          -6 (-4,11% of base) : 107283.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Byte,Byte,Byte],System.Byte[],System.Byte[],int):ubyte
          -6 (-4,08% of base) : 114145.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Int16,Int16,Int16],System.Int16[],System.Int16[],int):short
          -6 (-4,20% of base) : 115841.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Double,Double,Double],System.Double[],System.Double[],int):double
          -6 (-4,20% of base) : 115865.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[UInt64,UInt64,UInt64],System.UInt64[],System.UInt64[],int):long
          -6 (-4,11% of base) : 115931.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Byte,Byte,Byte],System.Byte[],System.Byte[],int):ubyte
          -6 (-4,08% of base) : 11769.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Int16,Int16,Int16],System.Int16[],System.Int16[],int):short
          -6 (-4,20% of base) : 118450.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Double,Double,Double],System.Double[],System.Double[],int):double
          -6 (-4,08% of base) : 118524.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[SByte,SByte,SByte],System.SByte[],System.SByte[],int):byte
          -6 (-4,11% of base) : 120180.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Byte,Byte,Byte],System.Byte[],System.Byte[],int):ubyte
          -6 (-4,20% of base) : 126075.dasm - JIT.HardwareIntrinsics.Arm.Helpers:Pairwise(System.Func`3[Single,Single,Single],System.Single[],System.Single[],int):float

Top method regressions (percentages):
           7 (87,50% of base) : 82420.dasm - test:bar(long,int):int
           7 (87,50% of base) : 216834.dasm - Thread_EA:Dispatch(long,int)
          12 (14,29% of base) : 86393.dasm - Client:method2():this
           9 ( 9,78% of base) : 163868.dasm - Internal.TypeSystem.TypeSystemHelpers:GetFullName(Internal.TypeSystem.DefType):System.String
          10 ( 9,52% of base) : 84133.dasm - TestCase:Test(TestCase,bool,bool):this
           7 ( 8,97% of base) : 234273.dasm - Avalon.Secure.Bar:OnBarEvent():this
           5 ( 6,94% of base) : 82150.dasm - System.Reflection.Internal.MemoryBlockProvider:GetMemoryBlock(int,int):System.Reflection.Internal.AbstractMemoryBlock:this
           7 ( 6,73% of base) : 230973.dasm - FtnTestsType:LdvirtFtn.VirtInstanceMethod_Valid(TestClass)
          14 ( 6,39% of base) : 197.dasm - System.Diagnostics.Process:ErrorReadNotifyUser(System.String):this
           7 ( 5,19% of base) : 215280.dasm - <>c__DisplayClass11_0:<SyncBlkVariants>b__0(MonEnterTests+Action`1[[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
           7 ( 4,90% of base) : 215281.dasm - <>c__DisplayClass11_0:<SyncBlkVariants>b__1(MonEnterTests+Action`1[[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
           7 ( 4,40% of base) : 215282.dasm - <>c__DisplayClass11_0:<SyncBlkVariants>b__2(MonEnterTests+Action`1[[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):this
           7 ( 4,07% of base) : 234270.dasm - Avalon.Secure.Foo:FooMethod(System.Object,System.EventArgs)
           5 ( 2,84% of base) : 163887.dasm - Internal.TypeSystem.TypeNameFormatter`2[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):System.__Canon:this
           5 ( 2,84% of base) : 163892.dasm - Internal.TypeSystem.TypeNameFormatter`2[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):ubyte:this
           5 ( 2,84% of base) : 163896.dasm - Internal.TypeSystem.TypeNameFormatter`2[Int16,Nullable`1][System.Int16,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):short:this
           5 ( 2,84% of base) : 163898.dasm - Internal.TypeSystem.TypeNameFormatter`2[Int32,Nullable`1][System.Int32,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):int:this
           5 ( 2,84% of base) : 163904.dasm - Internal.TypeSystem.TypeNameFormatter`2[Int64,Nullable`1][System.Int64,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):long:this
           5 ( 2,79% of base) : 163900.dasm - Internal.TypeSystem.TypeNameFormatter`2[Double,Nullable`1][System.Double,System.Nullable`1[System.Int32]]:AppendName(System.Text.StringBuilder,Internal.TypeSystem.DefType,System.Nullable`1[Int32]):double:this
           2 ( 2,53% of base) : 230970.dasm - FtnTestsType:LdFtn.StaticClassRefConstraint_Valid()

Top method improvements (percentages):
          -3 (-50,00% of base) : 84949.dasm - JitTest.Test:DoStuff(long)
          -3 (-50,00% of base) : 84954.dasm - JitTest.Test:DoStuff(long):int:this
          -3 (-50,00% of base) : 84958.dasm - JitTest.Test:DoStuff(long):int:this
          -4 (-40,00% of base) : 228509.dasm - Test.Child:CallAbstractFinal():System.String:this
          -4 (-40,00% of base) : 228510.dasm - Test.Child:CallAbstractOverrideNil():System.String:this
          -4 (-40,00% of base) : 228511.dasm - Test.Child:CallVirtualFinal():System.String:this
          -4 (-40,00% of base) : 228512.dasm - Test.Child:CallVirtualOverrideNil():System.String:this
          -4 (-40,00% of base) : 228514.dasm - Test.GrandChild:CallAbstractOverrideFinal():System.String:this
          -4 (-40,00% of base) : 228516.dasm - Test.GrandChild:CallAbstractOverrideOverride():System.String:this
          -4 (-40,00% of base) : 228517.dasm - Test.GrandChild:CallVirtualNilFinal():System.String:this
          -4 (-40,00% of base) : 228519.dasm - Test.GrandChild:CallVirtualOverrideFinal():System.String:this
          -4 (-40,00% of base) : 164851.dasm - <GetNestedTypes>d__46:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 164859.dasm - <GetDecodedCustomAttributes>d__2:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 164867.dasm - <GetDecodedCustomAttributes>d__4:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 164875.dasm - <GetDecodedCustomAttributes>d__5:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 164898.dasm - <Verify>d__8:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 164905.dasm - <Verify>d__9:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 164912.dasm - <Verify>d__10:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 164920.dasm - <VerifyMethods>d__11:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 164942.dasm - <GetAllTestDlls>d__9:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this

1978 total methods with Code Size differences (1585 improved, 393 regressed), 83 unchanged.


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


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 2634976
Total bytes of diff: 2539650
Total bytes of delta: -95326 (-3,62% of base)
    diff is an improvement.
Detail diffs


Top file regressions (bytes):
          85 : 84269.dasm (21,41% of base)
          65 : 143288.dasm (21,45% of base)
          55 : 143289.dasm (18,39% of base)
          37 : 85904.dasm (8,92% of base)
          34 : 222259.dasm (5,69% of base)
          32 : 82565.dasm (13,91% of base)
          30 : 143284.dasm (3,48% of base)
          26 : 110411.dasm (7,90% of base)
          25 : 226231.dasm (28,74% of base)
          25 : 226234.dasm (28,74% of base)
          23 : 152161.dasm (9,50% of base)
          23 : 222249.dasm (6,42% of base)
          22 : 166877.dasm (14,57% of base)
          22 : 167559.dasm (10,78% of base)
          22 : 167579.dasm (10,78% of base)
          21 : 147412.dasm (3,02% of base)
          18 : 193810.dasm (10,29% of base)
          18 : 193811.dasm (10,53% of base)
          18 : 167462.dasm (5,92% of base)
          17 : 210766.dasm (3,44% of base)

Top file improvements (bytes):
         -75 : 168567.dasm (-3,89% of base)
         -68 : 123086.dasm (-10,12% of base)
         -68 : 169011.dasm (-15,21% of base)
         -68 : 168590.dasm (-15,21% of base)
         -64 : 123087.dasm (-9,79% of base)
         -60 : 2787.dasm (-1,06% of base)
         -60 : 2757.dasm (-0,86% of base)
         -54 : 108576.dasm (-5,23% of base)
         -36 : 168903.dasm (-13,19% of base)
         -33 : 123427.dasm (-1,30% of base)
         -33 : 123192.dasm (-4,17% of base)
         -33 : 123194.dasm (-4,21% of base)
         -32 : 169009.dasm (-12,65% of base)
         -32 : 168583.dasm (-12,65% of base)
         -32 : 6549.dasm (-1,00% of base)
         -32 : 168900.dasm (-12,65% of base)
         -30 : 25623.dasm (-3,90% of base)
         -30 : 25624.dasm (-3,90% of base)
         -30 : 25625.dasm (-3,90% of base)
         -25 : 169010.dasm (-11,31% of base)

30014 total files with Code Size differences (29312 improved, 702 regressed), 238 unchanged.

Top method regressions (bytes):
          85 (21,41% of base) : 84269.dasm - Diagnostics.Tracing.StackSources.FilterParams:WriteToXml(System.Xml.XmlWriter):this
          65 (21,45% of base) : 143288.dasm - System.Xml.Xsl.XsltOld.SequentialOutput:WriteDoctype(System.Xml.Xsl.XsltOld.BuilderInfo):this
          55 (18,39% of base) : 143289.dasm - System.Xml.Xsl.XsltOld.SequentialOutput:WriteXmlDeclaration():this
          37 ( 8,92% of base) : 85904.dasm - Microsoft.Diagnostics.Tracing.Stacks.CallTreeNodeBase:ToXmlAttribs(System.IO.TextWriter):this
          34 ( 5,69% of base) : 222259.dasm - System.ServiceModel.Syndication.Atom10FeedFormatter:WriteCategory(System.Xml.XmlWriter,System.ServiceModel.Syndication.SyndicationCategory,System.String)
          32 (13,91% of base) : 82565.dasm - VersionResourceSerializer:WriteVersionString(System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],System.IO.BinaryWriter)
          30 ( 3,48% of base) : 143284.dasm - System.Xml.Xsl.XsltOld.SequentialOutput:WriteStartElement(System.Xml.Xsl.XsltOld.RecordBuilder):this
          26 ( 7,90% of base) : 110411.dasm - System.Data.XmlTreeGen:WriteSchemaRoot(System.Xml.XmlDocument,System.Xml.XmlElement,System.String):this
          25 (28,74% of base) : 226231.dasm - Disposable`2[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:System.IDisposable.Dispose():this
          25 (28,74% of base) : 226234.dasm - Disposable`2[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:System.IDisposable.Dispose():this
          23 ( 9,50% of base) : 152161.dasm - System.Speech.Recognition.SrgsGrammar.SrgsToken:WriteSrgs(System.Xml.XmlWriter):this
          23 ( 6,42% of base) : 222249.dasm - System.ServiceModel.Syndication.Atom10FeedFormatter:WritePersonTo(System.Xml.XmlWriter,System.ServiceModel.Syndication.SyndicationPerson,System.String):this
          22 (14,57% of base) : 166877.dasm - System.CommandLine.Help.HelpBuilder:Write(System.CommandLine.ICommand):this
          22 (10,78% of base) : 167559.dasm - Microsoft.Build.Framework.TargetFinishedEventArgs:WriteToStream(System.IO.BinaryWriter):this
          22 (10,78% of base) : 167579.dasm - Microsoft.Build.Framework.TaskFinishedEventArgs:WriteToStream(System.IO.BinaryWriter):this
          21 ( 3,02% of base) : 147412.dasm - System.Xml.Serialization.XmlSerializationWriter:WriteAttribute(System.String,System.String,System.String):this
          18 (10,29% of base) : 193810.dasm - ContentTypeHelper:WriteOverrideElement(System.Xml.XmlWriter,ValidatedPartUri,System.IO.Packaging.ContentType):this
          18 (10,53% of base) : 193811.dasm - ContentTypeHelper:WriteDefaultElement(System.Xml.XmlWriter,System.String,System.IO.Packaging.ContentType):this
          18 ( 5,92% of base) : 167462.dasm - Microsoft.Build.Framework.BuildMessageEventArgs:WriteToStream(System.IO.BinaryWriter):this
          17 ( 3,44% of base) : 210766.dasm - System.Xml.Linq.XDocument:WriteTo(System.Xml.XmlWriter):this

Top method improvements (bytes):
         -75 (-3,89% of base) : 168567.dasm - System.CodeDom.Compiler.CodeGenerator:GenerateExpression(System.CodeDom.CodeExpression):this
         -68 (-10,12% of base) : 123086.dasm - System.Linq.Expressions.Compiler.DelegateHelpers:GetFuncType(System.Type[]):System.Type
         -68 (-15,21% of base) : 169011.dasm - Microsoft.CSharp.CSharpCodeGenerator:OutputOperator(int):this
         -68 (-15,21% of base) : 168590.dasm - System.CodeDom.Compiler.CodeGenerator:OutputOperator(int):this
         -64 (-9,79% of base) : 123087.dasm - System.Linq.Expressions.Compiler.DelegateHelpers:GetActionType(System.Type[]):System.Type
         -60 (-1,06% of base) : 2787.dasm - Microsoft.FSharp.Linq.QueryModule:TransNestedOuter(int,Microsoft.FSharp.Quotations.FSharpExpr):Microsoft.FSharp.Quotations.FSharpExpr
         -60 (-0,86% of base) : 2757.dasm - Microsoft.FSharp.Linq.QueryModule:EvalNonNestedOuter(int,Microsoft.FSharp.Quotations.FSharpExpr):System.Object
         -54 (-5,23% of base) : 108576.dasm - Newtonsoft.Json.Converters.DataTableConverter:WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer):this
         -36 (-13,19% of base) : 168903.dasm - Microsoft.VisualBasic.VBCodeGenerator:OutputOperator(int):this
         -33 (-1,30% of base) : 123427.dasm - System.Linq.Expressions.Compiler.LambdaCompiler:EmitUnliftedBinaryOp(int,System.Type,System.Type):this
         -33 (-4,17% of base) : 123192.dasm - System.Linq.Expressions.Compiler.ILGen:EmitLoadValueIndirect(System.Reflection.Emit.ILGenerator,System.Type)
         -33 (-4,21% of base) : 123194.dasm - System.Linq.Expressions.Compiler.ILGen:EmitLoadElement(System.Reflection.Emit.ILGenerator,System.Type)
         -32 (-12,65% of base) : 169009.dasm - Microsoft.CSharp.CSharpCodeGenerator:OutputMemberAccessModifier(int):this
         -32 (-12,65% of base) : 168583.dasm - System.CodeDom.Compiler.CodeGenerator:OutputMemberAccessModifier(int):this
         -32 (-1,00% of base) : 6549.dasm - <StartupCode$FSharp-Core>.$Quotations:eq@197(Microsoft.FSharp.Quotations.Tree,Microsoft.FSharp.Quotations.Tree):bool
         -32 (-12,65% of base) : 168900.dasm - Microsoft.VisualBasic.VBCodeGenerator:OutputMemberAccessModifier(int):this
         -30 (-3,90% of base) : 25623.dasm - Microsoft.CodeAnalysis.CSharp.BuiltInOperators:LeftType(int):Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol:this
         -30 (-3,90% of base) : 25624.dasm - Microsoft.CodeAnalysis.CSharp.BuiltInOperators:RightType(int):Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol:this
         -30 (-3,90% of base) : 25625.dasm - Microsoft.CodeAnalysis.CSharp.BuiltInOperators:ReturnType(int):Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol:this
         -25 (-11,31% of base) : 169010.dasm - Microsoft.CSharp.CSharpCodeGenerator:OutputMemberScopeModifier(int):this

Top method regressions (percentages):
          25 (28,74% of base) : 226231.dasm - Disposable`2[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:System.IDisposable.Dispose():this
          25 (28,74% of base) : 226234.dasm - Disposable`2[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:System.IDisposable.Dispose():this
          65 (21,45% of base) : 143288.dasm - System.Xml.Xsl.XsltOld.SequentialOutput:WriteDoctype(System.Xml.Xsl.XsltOld.BuilderInfo):this
          85 (21,41% of base) : 84269.dasm - Diagnostics.Tracing.StackSources.FilterParams:WriteToXml(System.Xml.XmlWriter):this
           8 (19,51% of base) : 196952.dasm - SelectQueryOperatorResults[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:GetElement(int):System.Nullable`1[Int32]:this
           8 (19,05% of base) : 196948.dasm - SelectQueryOperatorResults[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:GetElement(int):System.Nullable`1[Int32]:this
          55 (18,39% of base) : 143289.dasm - System.Xml.Xsl.XsltOld.SequentialOutput:WriteXmlDeclaration():this
          10 (17,24% of base) : 161463.dasm - FastSerialization.SegmentedMemoryStreamReader:GotoSuffixLabel():this
           7 (16,67% of base) : 176665.dasm - <>c__DisplayClass14_0:<EvaluateThisTypeAgainstTheConvention>b__0(System.ComponentModel.Composition.Registration.PartBuilder):bool:this
          17 (15,45% of base) : 15726.dasm - System.Progress`1[Byte][System.Byte]:InvokeHandlers(System.Object):this
           7 (14,89% of base) : 226921.dasm - <>c__DisplayClass33_0`2[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:<ForEachWorker>b__0(int):this
           8 (14,81% of base) : 196803.dasm - IndexedSelectQueryOperatorResults[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:GetElement(int):System.Nullable`1[Int32]:this
           7 (14,58% of base) : 226916.dasm - <>c__DisplayClass33_0`2[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:<ForEachWorker>b__0(int):this
          22 (14,57% of base) : 166877.dasm - System.CommandLine.Help.HelpBuilder:Write(System.CommandLine.ICommand):this
           8 (14,55% of base) : 196799.dasm - IndexedSelectQueryOperatorResults[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:GetElement(int):System.Nullable`1[Int32]:this
          10 (14,29% of base) : 184990.dasm - <>c:<NotifyActivityStart>b__24_0(System.Diagnostics.ActivityListener,System.Object):this
          10 (14,29% of base) : 184991.dasm - <>c:<NotifyActivityStop>b__25_0(System.Diagnostics.ActivityListener,System.Object):this
          32 (13,91% of base) : 82565.dasm - VersionResourceSerializer:WriteVersionString(System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]],System.IO.BinaryWriter)
          10 (13,89% of base) : 130541.dasm - System.Runtime.Serialization.XmlObjectSerializer:InternalWriteObject(System.Runtime.Serialization.XmlWriterDelegator,System.Object):this
           7 (13,73% of base) : 102824.dasm - <>c__DisplayClass4_0:<ForEach>b__0(Microsoft.Diagnostics.Tracing.Stacks.StackSourceSample):this

Top method improvements (percentages):
          -4 (-40,00% of base) : 102846.dasm - <GetFiles>d__4:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 102850.dasm - <ReadAllLines>d__0:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 103196.dasm - <get_GetAllIndexes>d__29:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 103605.dasm - <FilterData>d__2:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 103613.dasm - <Stackify>d__3:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 123162.dasm - <GetVariablesIncludingMerged>d__32:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 134608.dasm - System.Xml.TextEncodedRawTextWriter:WriteCData(System.String):this
          -4 (-40,00% of base) : 141581.dasm - System.Xml.Xsl.XsltCompileException:GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext):this
          -4 (-40,00% of base) : 145259.dasm - System.Xml.Xsl.IlGen.XmlILOptimizerVisitor:AllowReplace(int,System.Xml.Xsl.Qil.QilNode):bool:this
          -4 (-40,00% of base) : 161505.dasm - FastSerialization.MemoryStreamWriter:Write(long):this
          -4 (-40,00% of base) : 161508.dasm - FastSerialization.MemoryStreamWriter:WriteSuffixLabel(long):this
          -4 (-40,00% of base) : 161949.dasm - <AsEnumerable>d__3:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 166912.dasm - System.CommandLine.Collections.AliasedSet`1[__Canon][System.__Canon]:get_Item(System.String):System.__Canon:this
          -4 (-40,00% of base) : 167135.dasm - <FlattenBreadthFirst>d__0`1[__Canon][System.__Canon]:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 167152.dasm - <RecurseWhileNotNull>d__1`1[__Canon][System.__Canon]:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 167175.dasm - <Split>d__2:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 167212.dasm - <ExpandResponseFile>d__15:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 167224.dasm - <AllSymbolResults>d__0:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 167316.dasm - <GetArgumentHelpItems>d__32:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 167328.dasm - <GetOptionHelpItems>d__34:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this

30014 total methods with Code Size differences (29312 improved, 702 regressed), 240 unchanged.


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


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 1904659
Total bytes of diff: 1820146
Total bytes of delta: -84513 (-4,44% of base)
    diff is an improvement.
Detail diffs


Top file regressions (bytes):
          96 : 336325.dasm (13,89% of base)
          75 : 289526.dasm (18,29% of base)
          75 : 289529.dasm (18,29% of base)
          46 : 259815.dasm (12,71% of base)
          44 : 336439.dasm (8,49% of base)
          38 : 230366.dasm (17,04% of base)
          30 : 259661.dasm (31,91% of base)
          29 : 259675.dasm (8,29% of base)
          29 : 259728.dasm (8,29% of base)
          28 : 166381.dasm (3,36% of base)
          26 : 259660.dasm (16,05% of base)
          26 : 277375.dasm (3,04% of base)
          25 : 343491.dasm (5,52% of base)
          25 : 289531.dasm (16,78% of base)
          24 : 197344.dasm (9,41% of base)
          24 : 60619.dasm (9,41% of base)
          23 : 323454.dasm (6,08% of base)
          23 : 323455.dasm (6,39% of base)
          23 : 323456.dasm (6,39% of base)
          22 : 259807.dasm (10,78% of base)

Top file improvements (bytes):
        -120 : 86426.dasm (-9,48% of base)
        -120 : 86541.dasm (-9,48% of base)
        -120 : 86626.dasm (-9,48% of base)
        -120 : 86739.dasm (-9,48% of base)
        -120 : 86885.dasm (-9,48% of base)
        -120 : 86962.dasm (-9,48% of base)
        -120 : 87039.dasm (-9,48% of base)
         -72 : 339673.dasm (-1,48% of base)
         -72 : 342733.dasm (-1,53% of base)
         -60 : 113681.dasm (-3,01% of base)
         -60 : 255744.dasm (-6,54% of base)
         -52 : 258860.dasm (-2,40% of base)
         -44 : 258259.dasm (-5,50% of base)
         -42 : 256171.dasm (-4,57% of base)
         -42 : 279612.dasm (-4,57% of base)
         -42 : 7153.dasm (-4,98% of base)
         -39 : 5673.dasm (-5,34% of base)
         -36 : 115025.dasm (-3,75% of base)
         -33 : 115009.dasm (-3,32% of base)
         -33 : 249493.dasm (-4,59% of base)

24590 total files with Code Size differences (24101 improved, 489 regressed), 130 unchanged.

Top method regressions (bytes):
          96 (13,89% of base) : 336325.dasm - <>c__DisplayClass8_0:<BasicLockTest>b__0():this
          75 (18,29% of base) : 289526.dasm - DefaultMachineConfig:WriteSections(System.Xml.XmlWriter):this
          75 (18,29% of base) : 289529.dasm - DefaultMachineConfig2:WriteSections(System.Xml.XmlWriter):this
          46 (12,71% of base) : 259815.dasm - Microsoft.Build.Framework.TargetSkippedEventArgs:WriteToStream(System.IO.BinaryWriter):this
          44 ( 8,49% of base) : 336439.dasm - <>c:<AsyncFlowControlTest>b__7_0():this
          38 (17,04% of base) : 230366.dasm - System.Threading.Tasks.Tests.TaskRtTests:RunRunTests_Unwrap_NegativeCases()
          30 (31,91% of base) : 259661.dasm - Microsoft.Build.Shared.BinaryWriterExtensions:WriteBuildEventContext(System.IO.BinaryWriter,Microsoft.Build.Framework.BuildEventContext)
          29 ( 8,29% of base) : 259675.dasm - Microsoft.Build.Framework.BuildErrorEventArgs:WriteToStream(System.IO.BinaryWriter):this
          29 ( 8,29% of base) : 259728.dasm - Microsoft.Build.Framework.BuildWarningEventArgs:WriteToStream(System.IO.BinaryWriter):this
          28 ( 3,36% of base) : 166381.dasm - System.Data.Tests.DataRelationCollectionTest:Add():this
          26 (16,05% of base) : 259660.dasm - Microsoft.Build.Shared.BinaryWriterExtensions:WriteOptionalBuildEventContext(System.IO.BinaryWriter,Microsoft.Build.Framework.BuildEventContext)
          26 ( 3,04% of base) : 277375.dasm - Stashbox.ResolutionScope:ActivateFactoryDelegate(System.Type,System.Type[],System.Object,bool):System.Delegate:this
          25 ( 5,52% of base) : 343491.dasm - System.Xml.Tests.XmlNodeReaderMoveToAttributeTests:NodeReaderMoveToAttributeWithAttributeXml():this
          25 (16,78% of base) : 289531.dasm - ParentProvider:WriteXml(System.Xml.XmlWriter):this
          24 ( 9,41% of base) : 197344.dasm - CustomStream:Seek(long,int):long:this
          24 ( 9,41% of base) : 60619.dasm - CustomStream:Seek(long,int):long:this
          23 ( 6,08% of base) : 323454.dasm - System.Reflection.Emit.Tests.ILGeneratorEmit2:PosTest4():this
          23 ( 6,39% of base) : 323455.dasm - System.Reflection.Emit.Tests.ILGeneratorEmit2:PosTest5():this
          23 ( 6,39% of base) : 323456.dasm - System.Reflection.Emit.Tests.ILGeneratorEmit2:PosTest6():this
          22 (10,78% of base) : 259807.dasm - Microsoft.Build.Framework.TargetFinishedEventArgs:WriteToStream(System.IO.BinaryWriter):this

Top method improvements (bytes):
        -120 (-9,48% of base) : 86426.dasm - System.Text.Json.SourceGeneration.Tests.MetadataAndSerializationContext:GetTypeInfo(System.Type):System.Text.Json.Serialization.Metadata.JsonTypeInfo:this
        -120 (-9,48% of base) : 86541.dasm - System.Text.Json.SourceGeneration.Tests.MetadataWithPerTypeAttributeContext:GetTypeInfo(System.Type):System.Text.Json.Serialization.Metadata.JsonTypeInfo:this
        -120 (-9,48% of base) : 86626.dasm - System.Text.Json.SourceGeneration.Tests.MetadataContext:GetTypeInfo(System.Type):System.Text.Json.Serialization.Metadata.JsonTypeInfo:this
        -120 (-9,48% of base) : 86739.dasm - System.Text.Json.SourceGeneration.Tests.MixedModeContext:GetTypeInfo(System.Type):System.Text.Json.Serialization.Metadata.JsonTypeInfo:this
        -120 (-9,48% of base) : 86885.dasm - System.Text.Json.SourceGeneration.Tests.SerializationContext:GetTypeInfo(System.Type):System.Text.Json.Serialization.Metadata.JsonTypeInfo:this
        -120 (-9,48% of base) : 86962.dasm - System.Text.Json.SourceGeneration.Tests.SerializationWithPerTypeAttributeContext:GetTypeInfo(System.Type):System.Text.Json.Serialization.Metadata.JsonTypeInfo:this
        -120 (-9,48% of base) : 87039.dasm - System.Text.Json.SourceGeneration.Tests.SerializationContextWithCamelCase:GetTypeInfo(System.Type):System.Text.Json.Serialization.Metadata.JsonTypeInfo:this
         -72 (-1,48% of base) : 339673.dasm - TCWriteState:InvokeMethod(System.Xml.XmlWriter,System.String):this
         -72 (-1,53% of base) : 342733.dasm - TCWriteState:InvokeMethod(System.Xml.XmlWriter,System.String):this
         -60 (-3,01% of base) : 113681.dasm - FastExpressionCompiler.LightExpression.Tools:GetFuncOrActionType(System.Type[],System.Type):System.Type
         -60 (-6,54% of base) : 255744.dasm - LamarCompiler.Util.Tools:GetFuncOrActionType(System.Type[],System.Type):System.Type
         -52 (-2,40% of base) : 258860.dasm - <>c__DisplayClass181_0:<GetEmitMethodForDefaultValue>b__0(LightInject.IEmitter):this
         -44 (-5,50% of base) : 258259.dasm - LightInject.EmitterExtensions:Push(LightInject.IEmitter,int)
         -42 (-4,57% of base) : 256171.dasm - LamarCompiler.Util.ExpressionVisitorBase:Visit(System.Linq.Expressions.Expression):System.Linq.Expressions.Expression:this
         -42 (-4,57% of base) : 279612.dasm - StructureMap.ExpressionVisitorBase:Visit(System.Linq.Expressions.Expression):System.Linq.Expressions.Expression:this
         -42 (-4,98% of base) : 7153.dasm - Microsoft.CodeAnalysis.Shared.Extensions.SyntaxGeneratorExtensions:NewBinaryOperation(Microsoft.CodeAnalysis.Operations.IBinaryOperation,Microsoft.CodeAnalysis.SyntaxNode,int,Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.Editing.SyntaxGenerator):Microsoft.CodeAnalysis.SyntaxNode
         -39 (-5,34% of base) : 5673.dasm - Microsoft.CodeAnalysis.Collections.Internal.ThrowHelper:GetResourceString(int):System.String
         -36 (-3,75% of base) : 115025.dasm - EmittingVisitor:EmitDereference(System.Reflection.Emit.ILGenerator,System.Type)
         -33 (-3,32% of base) : 115009.dasm - EmittingVisitor:EmitLoadConstantInt(System.Reflection.Emit.ILGenerator,int)
         -33 (-4,59% of base) : 249493.dasm - Castle.DynamicProxy.Generators.Emitters.SimpleAST.LiteralIntExpression:Emit(Castle.DynamicProxy.Generators.Emitters.IMemberEmitter,System.Reflection.Emit.ILGenerator):this

Top method regressions (percentages):
           7 (77,78% of base) : 268471.dasm - __M11Struct[__Canon][System.__Canon]:Format(__M11Struct[__Canon],System.Exception):System.String
          30 (31,91% of base) : 259661.dasm - Microsoft.Build.Shared.BinaryWriterExtensions:WriteBuildEventContext(System.IO.BinaryWriter,Microsoft.Build.Framework.BuildEventContext)
          17 (26,15% of base) : 271966.dasm - Moq.Linq.MockQueryable`1[__Canon][System.__Canon]:GetEnumerator():System.Collections.Generic.IEnumerator`1[__Canon]:this
           7 (21,21% of base) : 131591.dasm - Microsoft.Build.BackEnd.Logging.BaseConsoleLogger:WriteNewLine():this
          19 (21,11% of base) : 123919.dasm - Microsoft.Build.Collections.ReadOnlyCollection`1[__Canon][System.__Canon]:Contains(System.__Canon):bool:this
          19 (21,11% of base) : 131925.dasm - Microsoft.Build.Collections.ReadOnlyCollection`1[__Canon][System.__Canon]:Contains(System.__Canon):bool:this
          15 (19,23% of base) : 133979.dasm - NodeContext:WriteInt32(System.IO.MemoryStream,int):this
          75 (18,29% of base) : 289526.dasm - DefaultMachineConfig:WriteSections(System.Xml.XmlWriter):this
          75 (18,29% of base) : 289529.dasm - DefaultMachineConfig2:WriteSections(System.Xml.XmlWriter):this
           7 (17,95% of base) : 305999.dasm - <>c__DisplayClass36_0:<VerifyLongTimeout>b__0():this
          10 (17,86% of base) : 12661.dasm - <>c__DisplayClass3_0`2[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:<SafeContinueWith>b__0(System.Threading.Tasks.Task):System.Nullable`1[Int32]:this
          10 (17,86% of base) : 12663.dasm - <>c__DisplayClass4_0`1[Byte][System.Byte]:<SafeContinueWith>b__0(System.Threading.Tasks.Task):this
          10 (17,86% of base) : 123424.dasm - <>c__DisplayClass14_1:<HaveAttribute>b__3(System.Object):bool:this
          10 (17,86% of base) : 12672.dasm - <>c__DisplayClass8_0`2[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:<SafeContinueWithFromAsync>b__0(System.Threading.Tasks.Task):System.Threading.Tasks.Task`1[Nullable`1]:this
          10 (17,24% of base) : 249099.dasm - Castle.DynamicProxy.StandardInterceptor:Intercept(Castle.DynamicProxy.IInvocation):this
          10 (17,24% of base) : 271417.dasm - Moq.Match`1[__Canon][System.__Canon]:SetupEvaluatedSuccessfully(System.Object):this
           7 (17,07% of base) : 281417.dasm - <>c__DisplayClass2_0:<TypeMatches>b__0(System.Reflection.PropertyInfo):bool:this
           7 (17,07% of base) : 281419.dasm - <>c__DisplayClass6_0:<NameMatches>b__0(System.Reflection.PropertyInfo):bool:this
           7 (17,07% of base) : 257861.dasm - <>c__DisplayClass3_0:<TypeMatches>b__0(System.Reflection.PropertyInfo):bool:this
           7 (17,07% of base) : 257863.dasm - <>c__DisplayClass7_0:<NameMatches>b__0(System.Reflection.PropertyInfo):bool:this

Top method improvements (percentages):
          -4 (-40,00% of base) : 105800.dasm - <GetRootLevelPrimitives>d__228:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 110062.dasm - <TypesWithInvalidMembers_WithMembers>d__15:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 123525.dasm - <GetPropertiesAndFields>d__12:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 123531.dasm - <GetMethods>d__13:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 123561.dasm - <ProvideMetadata>d__3:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 123581.dasm - <IterateInOrder>d__10[__Canon,Nullable`1][System.__Canon,System.Nullable`1[System.Int32]]:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 123587.dasm - <IterateInOrder>d__10[Byte,Nullable`1][System.Byte,System.Nullable`1[System.Int32]]:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 127077.dasm - <RemoveInitialDotSlash>d__35:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 127084.dasm - <RemoveProjectDirectory>d__37:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 128178.dasm - Microsoft.Build.Logging.DistributedFileLogger:Initialize(Microsoft.Build.Framework.IEventSource,int):this
          -4 (-40,00% of base) : 130567.dasm - Microsoft.Build.BackEnd.ResultsCache:.ctor(Microsoft.Build.BackEnd.ITranslator):this
          -4 (-40,00% of base) : 13065.dasm - <GetAddedProjectReferences>d__9:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 137480.dasm - <GetAncestorsOrThis>d__60:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 137487.dasm - <GetAllTrailingTrivia>d__19:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 137504.dasm - <FilterComments>d__22:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 137515.dasm - <TakeRange>d__7:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 137593.dasm - <GetCodeStyleOptions>d__65:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 137597.dasm - <GetExpressionBodyOptions>d__66:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 143935.dasm - <EnumerateGCRoots>d__19:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this
          -4 (-40,00% of base) : 143942.dasm - <WhenEach>d__20:System.Collections.IEnumerable.GetEnumerator():System.Collections.IEnumerator:this

24590 total methods with Code Size differences (24101 improved, 489 regressed), 130 unchanged.


Typical improvements:

diff --git "a/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\base\\10456.dasm" "b/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\diff\\10456.dasm"
index 0afccab..7541ecd 100644
--- "a/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\base\\10456.dasm"
+++ "b/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\diff\\10456.dasm"
@@ -25,20 +25,20 @@ G_M1504_IG02:        ; gcrefRegs=00000002 {rcx}, byrefRegs=00000000 {}, byref, i
        mov      rax, 0xD1FFAB1E      ; hackishClassName
        cmp      qword ptr [rcx], rax
        jne      SHORT G_M1504_IG04
-       mov      rax, qword ptr [(reloc)]
-						;; bbWeight=1    PerfScore 7.25
+						;; bbWeight=1    PerfScore 5.25
 G_M1504_IG03:        ; , epilog, nogc, extend
-       rex.jmp  rax
+       tail.jmp [Logger:IsEnabled(int):bool:this]
+       ; gcr arg pop 0
 						;; bbWeight=1    PerfScore 2.00
 G_M1504_IG04:        ; gcVars=0000000000000000 {}, gcrefRegs=00000002 {rcx}, byrefRegs=00000000 {}, gcvars, byref
        mov      r11, 0xD1FFAB1E
-       mov      rax, qword ptr [(reloc)]
 						;; bbWeight=0    PerfScore 0.00
 G_M1504_IG05:        ; , epilog, nogc, extend
-       rex.jmp  rax
+       tail.jmp [hackishModuleName:hackishMethodName()]
+       ; gcr arg pop 0
 						;; bbWeight=0    PerfScore 0.00
 
-; Total bytes of code 49, prolog size 0, PerfScore 14.15, instruction count 9, allocated bytes for code 49 (MethodHash=e611fa1f) for method Logger`1:Microsoft.Extensions.Logging.ILogger.IsEnabled(int):bool:this
+; Total bytes of code 41, prolog size 0, PerfScore 11.35, instruction count 7, allocated bytes for code 41 (MethodHash=e611fa1f) for method Logger`1:Microsoft.Extensions.Logging.ILogger.IsEnabled(int):bool:this
 ; ============================================================
 
 Unwind Info:
diff --git "a/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\base\\11392.dasm" "b/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\diff\\11392.dasm"
index 41c6f74..8de9722 100644
--- "a/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\base\\11392.dasm"
+++ "b/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\diff\\11392.dasm"
@@ -33,13 +33,12 @@ G_M28340_IG04:        ; gcVars=0000000000000000 {}, gcrefRegs=00000002 {rcx}, by
        ; gcrRegs -[rax]
        mov      rax, qword ptr [rcx]
        mov      rax, qword ptr [rax+80]
-       mov      rax, qword ptr [rax+32]
 						;; bbWeight=0    PerfScore 0.00
 G_M28340_IG05:        ; , epilog, nogc, extend
-       rex.jmp  rax
+       tail.jmp qword ptr [rax+32]hackishModuleName:hackishMethodName()
 						;; bbWeight=0    PerfScore 0.00
 
-; Total bytes of code 37, prolog size 0, PerfScore 9.95, instruction count 9, allocated bytes for code 37 (MethodHash=f0b5914b) for method TransportConnection:Microsoft.AspNetCore.Connections.Features.IMemoryPoolFeature.get_MemoryPool():MemoryPool`1:this
+; Total bytes of code 34, prolog size 0, PerfScore 9.65, instruction count 8, allocated bytes for code 34 (MethodHash=f0b5914b) for method TransportConnection:Microsoft.AspNetCore.Connections.Features.IMemoryPoolFeature.get_MemoryPool():MemoryPool`1:this
 ; ============================================================
 
 Unwind Info:

The regressions are due to LSRA making suboptimal choices with the extra freedom it is given for registers. Typical regression:

diff --git "a/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\base\\19767.dasm" "b/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\diff\\19767.dasm"
index ba49752..480d44b 100644
--- "a/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\base\\19767.dasm"
+++ "b/D:\\dev\\dotnet\\spmi\\asm.aspnet.run.windows.x64.checked\\diff\\19767.dasm"
@@ -8,39 +8,40 @@
 ;
 ;  V00 this         [V00,T00] (  5,  5   )     ref  ->  rcx         this class-hnd single-def
 ;  V01 OutArgs      [V01    ] (  1,  1   )  lclBlk (32) [rsp+00H]   "OutgoingArgSpace"
-;  V02 tmp1         [V02,T02] (  2,  4   )     ref  ->  rsi         class-hnd single-def "non-inline candidate call"
+;  V02 tmp1         [V02,T02] (  2,  4   )     ref  ->  [rsp+28H]   class-hnd single-def "non-inline candidate call"
 ;  V03 tmp2         [V03,T03] (  2,  4   )     ref  ->  rdx         single-def "argument with side effect"
-;  V04 rat0         [V04,T01] (  3,  6   )     ref  ->  rsi         "delegate invoke call"
+;  V04 rat0         [V04,T01] (  3,  6   )     ref  ->  rax         "delegate invoke call"
 ;
-; Lcl frame size = 32
+; Lcl frame size = 48
 
 G_M501_IG01:        ; gcrefRegs=00000000 {}, byrefRegs=00000000 {}, byref, nogc <-- Prolog IG
        push     rsi
-       sub      rsp, 32
+       sub      rsp, 48
 						;; bbWeight=1    PerfScore 1.25
 G_M501_IG02:        ; gcrefRegs=00000002 {rcx}, byrefRegs=00000000 {}, byref
        ; gcrRegs +[rcx]
        mov      rsi, gword ptr [rcx+8]
        ; gcrRegs +[rsi]
-       mov      rax, qword ptr [rcx]
-       mov      rax, qword ptr [rax+64]
-       call     gword ptr [rax+32]hackishModuleName:hackishMethodName()
-       ; gcrRegs -[rcx] +[rax]
+       mov      gword ptr [rsp+28H], rsi
+       ; GC ptr vars +{V02}
+       mov      rdx, qword ptr [rcx]
+       mov      rdx, qword ptr [rdx+64]
+       call     gword ptr [rdx+32]hackishModuleName:hackishMethodName()
+       ; gcrRegs -[rcx rsi] +[rax]
        ; gcr arg pop 0
        mov      rdx, rax
        ; gcrRegs +[rdx]
-       mov      rcx, gword ptr [rsi+8]
+       mov      rax, gword ptr [rsp+28H]
+       mov      rcx, gword ptr [rax+8]
        ; gcrRegs +[rcx]
-       mov      rax, qword ptr [rsi+24]
-       ; gcrRegs -[rax]
 						;; bbWeight=1    PerfScore 13.25
 G_M501_IG03:        ; , epilog, nogc, extend
-       add      rsp, 32
+       add      rsp, 48
        pop      rsi
-       rex.jmp  rax
+       tail.jmp qword ptr [rax+24]hackishModuleName:hackishMethodName()
 						;; bbWeight=1    PerfScore 2.75
 
-; Total bytes of code 38, prolog size 5, PerfScore 21.05, instruction count 12, allocated bytes for code 38 (MethodHash=d3a3fe0a) for method RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this
+; Total bytes of code 45, prolog size 5, PerfScore 21.75, instruction count 13, allocated bytes for code 45 (MethodHash=d3a3fe0a) for method RelationalExecutionStrategyFactory:Create():IExecutionStrategy:this
 ; ============================================================
 
 Unwind Info:
@@ -53,5 +54,5 @@ Unwind Info:
   FrameRegister     : none (0)
   FrameOffset       : N/A (no FrameRegister) (Value=0)
   UnwindCodes       :
-    CodeOffset: 0x05 UnwindOp: UWOP_ALLOC_SMALL (2)     OpInfo: 3 * 8 + 8 = 32 = 0x20
+    CodeOffset: 0x05 UnwindOp: UWOP_ALLOC_SMALL (2)     OpInfo: 5 * 8 + 8 = 48 = 0x30
     CodeOffset: 0x01 UnwindOp: UWOP_PUSH_NONVOL (0)     OpInfo: rsi (6)

Also add some assertions that we are using non-volatile registers when
generating the tailcall.

Fixes the arm64 tests as a side effect. It seems there is a bug in the
allocator when specifying only a single register as a candidate where it
may use a local variable's home instead of the candidate.
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib, @janvorli (for unwinder parts)

@jakobbotsch
Copy link
Member Author

ping @dotnet/jit-contrib, @janvorli

@jakobbotsch
Copy link
Member Author

ping @dotnet/jit-contrib, would appreciate a review

Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

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

LGTM, I've played with it locally, nice improvements!

}
else
#endif // TARGET_ARM
if (varTypeUsesFloatArgReg(returnType))
Copy link
Member

@janvorli janvorli Sep 16, 2021

Choose a reason for hiding this comment

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

Just out of curiosity - is this strange indentation intentional or is it a result of the clang format?

Copy link
Member

@EgorBo EgorBo Sep 16, 2021

Choose a reason for hiding this comment

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

@janvorli yeah it's clang-format (I remember seeing exact the same pattern after it)

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

The changes in the excepamd64.cpp look good. I have not reviewed the JIT ones.

@@ -367,7 +367,7 @@ RtlVirtualUnwind_Worker (
// This is a jmp outside of the function, probably a tail call
// to an import function.
InEpilogue = TRUE;
NextByte += 2;
NextByte += 6;
Copy link
Member

Choose a reason for hiding this comment

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

I am curious - how did you discover this issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

I only noticed that the code was wrong when I was trying to make sure that the new jmp instructions would be properly handled during unwinding. I haven't actually seen any issue (we have also never generated this particular form of jmp before this PR).

@jakobbotsch jakobbotsch merged commit 59d7ede into dotnet:main Sep 21, 2021
@jakobbotsch jakobbotsch deleted the contained-tailcalls branch September 27, 2021 09:29
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
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.

None yet

3 participants