Skip to content

Conversation

@SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Aug 17, 2021

Apparently, such folding was disallowed, for unclear reasons likely pertaining to the fact that gtFoldExprConst is very old.

No SPMI diffs for linux-arm and win-x86 (as expected).

Small positive diffs for win-arm64 and win-x64, also as expected.

coreclr_tests.pmi.windows.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 2436
Total bytes of diff: 2340
Total bytes of delta: -96 (-3.94% of base)
Total relative delta: -0.28
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
         -32 : 251951.dasm (-6.78% of base)
         -32 : 80305.dasm (-17.39% of base)
         -16 : 246056.dasm (-2.74% of base)
         -16 : 249755.dasm (-1.34% of base)

4 total files with Code Size differences (4 improved, 0 regressed), 0 unchanged.

Top method improvements (bytes):
         -32 (-6.78% of base) : 251951.dasm - DefaultNamespace.ArrCpy:Main(System.String[]):int
         -32 (-17.39% of base) : 80305.dasm - Default.q:func(int,int,System.Byte[],System.Int32[]):int
         -16 (-2.74% of base) : 246056.dasm - DefaultNamespace.GC_Base1:runTest(int,int):bool:this
         -16 (-1.34% of base) : 249755.dasm - Threading.Tests.OSThreadId:Main(System.String[]):int

Top method improvements (percentages):
         -32 (-17.39% of base) : 80305.dasm - Default.q:func(int,int,System.Byte[],System.Int32[]):int
         -32 (-6.78% of base) : 251951.dasm - DefaultNamespace.ArrCpy:Main(System.String[]):int
         -16 (-2.74% of base) : 246056.dasm - DefaultNamespace.GC_Base1:runTest(int,int):bool:this
         -16 (-1.34% of base) : 249755.dasm - Threading.Tests.OSThreadId:Main(System.String[]):int

4 total methods with Code Size differences (4 improved, 0 regressed), 0 unchanged.


libraries.crossgen2.windows.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 2616
Total bytes of diff: 2544
Total bytes of delta: -72 (-2.75% of base)
Total relative delta: -0.14
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
         -16 : 126499.dasm (-2.41% of base)
         -16 : 102247.dasm (-3.36% of base)
         -16 : 144760.dasm (-2.92% of base)
         -12 : 2511.dasm (-3.00% of base)
         -12 : 2328.dasm (-2.27% of base)

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

Top method improvements (bytes):
         -16 (-2.41% of base) : 126499.dasm - ItemType:Create(int,System.Xml.Xsl.XmlQualifiedNameTest,System.Xml.Schema.XmlSchemaType,bool):System.Xml.Xsl.XmlQueryType
         -16 (-3.36% of base) : 102247.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocated(System.Collections.Generic.List`1[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int):double
         -16 (-2.92% of base) : 144760.dasm - System.Data.SqlTypes.SqlDecimal:CalculatePrecision():ubyte:this
         -12 (-3.00% of base) : 2511.dasm - Newtonsoft.Json.Utilities.EnumUtils:InternalFlagsFormat(Newtonsoft.Json.Utilities.EnumInfo,long):System.String
         -12 (-2.27% of base) : 2328.dasm - Newtonsoft.Json.Utilities.StringUtils:ToCamelCase(System.String):System.String

Top method improvements (percentages):
         -16 (-3.36% of base) : 102247.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocated(System.Collections.Generic.List`1[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int):double
         -12 (-3.00% of base) : 2511.dasm - Newtonsoft.Json.Utilities.EnumUtils:InternalFlagsFormat(Newtonsoft.Json.Utilities.EnumInfo,long):System.String
         -16 (-2.92% of base) : 144760.dasm - System.Data.SqlTypes.SqlDecimal:CalculatePrecision():ubyte:this
         -16 (-2.41% of base) : 126499.dasm - ItemType:Create(int,System.Xml.Xsl.XmlQualifiedNameTest,System.Xml.Schema.XmlSchemaType,bool):System.Xml.Xsl.XmlQueryType
         -12 (-2.27% of base) : 2328.dasm - Newtonsoft.Json.Utilities.StringUtils:ToCamelCase(System.String):System.String

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


libraries.pmi.windows.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 3272
Total bytes of diff: 3184
Total bytes of delta: -88 (-2.69% of base)
Total relative delta: -0.17
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
         -16 : 111614.dasm (-2.72% of base)
         -16 : 131278.dasm (-2.78% of base)
         -16 : 102766.dasm (-4.44% of base)
         -16 : 102769.dasm (-2.37% of base)
         -12 : 105160.dasm (-3.06% of base)
         -12 : 105356.dasm (-1.76% of base)

6 total files with Code Size differences (6 improved, 0 regressed), 0 unchanged.

Top method improvements (bytes):
         -16 (-2.72% of base) : 111614.dasm - System.Data.SqlTypes.SqlDecimal:CalculatePrecision():ubyte:this
         -16 (-2.78% of base) : 131278.dasm - ItemType:Create(int,System.Xml.Xsl.XmlQualifiedNameTest,System.Xml.Schema.XmlSchemaType,bool):System.Xml.Xsl.XmlQueryType
         -16 (-4.44% of base) : 102766.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocated(System.Collections.Generic.List`1[[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC, Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.65.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int):double
         -16 (-2.37% of base) : 102769.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocatedPerHeap(System.Collections.Generic.List`1[[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC, Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.65.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int,int):double
         -12 (-3.06% of base) : 105160.dasm - Newtonsoft.Json.Utilities.EnumUtils:InternalFlagsFormat(Newtonsoft.Json.Utilities.EnumInfo,long):System.String
         -12 (-1.76% of base) : 105356.dasm - Newtonsoft.Json.Utilities.StringUtils:ToCamelCase(System.String):System.String

Top method improvements (percentages):
         -16 (-4.44% of base) : 102766.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocated(System.Collections.Generic.List`1[[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC, Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.65.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int):double
         -12 (-3.06% of base) : 105160.dasm - Newtonsoft.Json.Utilities.EnumUtils:InternalFlagsFormat(Newtonsoft.Json.Utilities.EnumInfo,long):System.String
         -16 (-2.78% of base) : 131278.dasm - ItemType:Create(int,System.Xml.Xsl.XmlQualifiedNameTest,System.Xml.Schema.XmlSchemaType,bool):System.Xml.Xsl.XmlQueryType
         -16 (-2.72% of base) : 111614.dasm - System.Data.SqlTypes.SqlDecimal:CalculatePrecision():ubyte:this
         -16 (-2.37% of base) : 102769.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocatedPerHeap(System.Collections.Generic.List`1[[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC, Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.65.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int,int):double
         -12 (-1.76% of base) : 105356.dasm - Newtonsoft.Json.Utilities.StringUtils:ToCamelCase(System.String):System.String

6 total methods with Code Size differences (6 improved, 0 regressed), 0 unchanged.


libraries_tests.pmi.windows.arm64.checked.mch:


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 4684
Total bytes of diff: 4544
Total bytes of delta: -140 (-2.99% of base)
Total relative delta: -0.24
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
         -32 : 243544.dasm (-3.96% of base)
         -24 : 11185.dasm (-3.35% of base)
         -24 : 240941.dasm (-5.94% of base)
         -24 : 236667.dasm (-5.94% of base)
         -20 : 82373.dasm (-1.05% of base)
         -16 : 120798.dasm (-3.51% of base)

6 total files with Code Size differences (6 improved, 0 regressed), 0 unchanged.

Top method improvements (bytes):
         -32 (-3.96% of base) : 243544.dasm - WebData.BaseLib.StringGen:GetIllegalXmlStringWithSeed(int,bool,int):System.String
         -24 (-3.35% of base) : 11185.dasm - Builder:Add(Microsoft.CodeAnalysis.Text.TextSpan,int):this
         -24 (-5.94% of base) : 240941.dasm - System.Data.SqlClient.TdsParser:TryProcessTableName(int,System.Data.SqlClient.TdsParserStateObject,byref):bool:this
         -24 (-5.94% of base) : 236667.dasm - System.Data.SqlClient.TdsParser:TryProcessTableName(int,System.Data.SqlClient.TdsParserStateObject,byref):bool:this
         -20 (-1.05% of base) : 82373.dasm - System.Text.Encodings.Web.Tests.UnicodeHelpersTests:ReadListOfDefinedCharacters():System.Boolean[]
         -16 (-3.51% of base) : 120798.dasm - Microsoft.Build.Graph.GraphBuilder:FormatCircularDependencyError(System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):System.String

Top method improvements (percentages):
         -24 (-5.94% of base) : 240941.dasm - System.Data.SqlClient.TdsParser:TryProcessTableName(int,System.Data.SqlClient.TdsParserStateObject,byref):bool:this
         -24 (-5.94% of base) : 236667.dasm - System.Data.SqlClient.TdsParser:TryProcessTableName(int,System.Data.SqlClient.TdsParserStateObject,byref):bool:this
         -32 (-3.96% of base) : 243544.dasm - WebData.BaseLib.StringGen:GetIllegalXmlStringWithSeed(int,bool,int):System.String
         -16 (-3.51% of base) : 120798.dasm - Microsoft.Build.Graph.GraphBuilder:FormatCircularDependencyError(System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):System.String
         -24 (-3.35% of base) : 11185.dasm - Builder:Add(Microsoft.CodeAnalysis.Text.TextSpan,int):this
         -20 (-1.05% of base) : 82373.dasm - System.Text.Encodings.Web.Tests.UnicodeHelpersTests:ReadListOfDefinedCharacters():System.Boolean[]

6 total methods with Code Size differences (6 improved, 0 regressed), 0 unchanged.


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


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 2166
Total bytes of diff: 2117
Total bytes of delta: -49 (-2.26% of base)
Total relative delta: -0.22
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
         -19 : 252655.dasm (-4.74% of base)
         -18 : 80606.dasm (-15.38% of base)
          -6 : 246802.dasm (-1.32% of base)
          -6 : 250440.dasm (-0.50% of base)

4 total files with Code Size differences (4 improved, 0 regressed), 0 unchanged.

Top method improvements (bytes):
         -19 (-4.74% of base) : 252655.dasm - DefaultNamespace.ArrCpy:Main(System.String[]):int
         -18 (-15.38% of base) : 80606.dasm - Default.q:func(int,int,System.Byte[],System.Int32[]):int
          -6 (-1.32% of base) : 246802.dasm - DefaultNamespace.GC_Base1:runTest(int,int):bool:this
          -6 (-0.50% of base) : 250440.dasm - Threading.Tests.OSThreadId:Main(System.String[]):int

Top method improvements (percentages):
         -18 (-15.38% of base) : 80606.dasm - Default.q:func(int,int,System.Byte[],System.Int32[]):int
         -19 (-4.74% of base) : 252655.dasm - DefaultNamespace.ArrCpy:Main(System.String[]):int
          -6 (-1.32% of base) : 246802.dasm - DefaultNamespace.GC_Base1:runTest(int,int):bool:this
          -6 (-0.50% of base) : 250440.dasm - Threading.Tests.OSThreadId:Main(System.String[]):int

4 total methods with Code Size differences (4 improved, 0 regressed), 0 unchanged.


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


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 2145
Total bytes of diff: 2091
Total bytes of delta: -54 (-2.52% of base)
Total relative delta: -0.15
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
         -13 : 97469.dasm (-3.04% of base)
         -11 : 109084.dasm (-3.86% of base)
          -9 : 69754.dasm (-1.99% of base)
          -9 : 108903.dasm (-2.91% of base)
          -6 : 69757.dasm (-1.71% of base)
          -6 : 116381.dasm (-1.86% of base)

6 total files with Code Size differences (6 improved, 0 regressed), 0 unchanged.

Top method improvements (bytes):
         -13 (-3.04% of base) : 97469.dasm - ItemType:Create(int,System.Xml.Xsl.XmlQualifiedNameTest,System.Xml.Schema.XmlSchemaType,bool):System.Xml.Xsl.XmlQueryType
         -11 (-3.86% of base) : 109084.dasm - Newtonsoft.Json.Utilities.EnumUtils:InternalFlagsFormat(Newtonsoft.Json.Utilities.EnumInfo,long):System.String
          -9 (-1.99% of base) : 69754.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocatedPerHeap(System.Collections.Generic.List`1[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int,int):double
          -9 (-2.91% of base) : 108903.dasm - Newtonsoft.Json.Utilities.StringUtils:ToCamelCase(System.String):System.String
          -6 (-1.71% of base) : 69757.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocated(System.Collections.Generic.List`1[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int):double
          -6 (-1.86% of base) : 116381.dasm - System.Data.SqlTypes.SqlDecimal:CalculatePrecision():ubyte:this

Top method improvements (percentages):
         -11 (-3.86% of base) : 109084.dasm - Newtonsoft.Json.Utilities.EnumUtils:InternalFlagsFormat(Newtonsoft.Json.Utilities.EnumInfo,long):System.String
         -13 (-3.04% of base) : 97469.dasm - ItemType:Create(int,System.Xml.Xsl.XmlQualifiedNameTest,System.Xml.Schema.XmlSchemaType,bool):System.Xml.Xsl.XmlQueryType
          -9 (-2.91% of base) : 108903.dasm - Newtonsoft.Json.Utilities.StringUtils:ToCamelCase(System.String):System.String
          -9 (-1.99% of base) : 69754.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocatedPerHeap(System.Collections.Generic.List`1[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int,int):double
          -6 (-1.86% of base) : 116381.dasm - System.Data.SqlTypes.SqlDecimal:CalculatePrecision():ubyte:this
          -6 (-1.71% of base) : 69757.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocated(System.Collections.Generic.List`1[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int):double

6 total methods with Code Size differences (6 improved, 0 regressed), 0 unchanged.


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


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 2664
Total bytes of diff: 2618
Total bytes of delta: -46 (-1.73% of base)
Total relative delta: -0.11
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
          -9 : 102673.dasm (-1.79% of base)
          -9 : 140495.dasm (-1.65% of base)
          -9 : 107133.dasm (-1.46% of base)
          -7 : 106937.dasm (-2.36% of base)
          -6 : 113423.dasm (-1.49% of base)
          -6 : 102670.dasm (-1.99% of base)

6 total files with Code Size differences (6 improved, 0 regressed), 0 unchanged.

Top method improvements (bytes):
          -9 (-1.79% of base) : 102673.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocatedPerHeap(System.Collections.Generic.List`1[[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC, Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.65.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int,int):double
          -9 (-1.65% of base) : 140495.dasm - ItemType:Create(int,System.Xml.Xsl.XmlQualifiedNameTest,System.Xml.Schema.XmlSchemaType,bool):System.Xml.Xsl.XmlQueryType
          -9 (-1.46% of base) : 107133.dasm - Newtonsoft.Json.Utilities.StringUtils:ToCamelCase(System.String):System.String
          -7 (-2.36% of base) : 106937.dasm - Newtonsoft.Json.Utilities.EnumUtils:InternalFlagsFormat(Newtonsoft.Json.Utilities.EnumInfo,long):System.String
          -6 (-1.49% of base) : 113423.dasm - System.Data.SqlTypes.SqlDecimal:CalculatePrecision():ubyte:this
          -6 (-1.99% of base) : 102670.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocated(System.Collections.Generic.List`1[[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC, Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.65.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int):double

Top method improvements (percentages):
          -7 (-2.36% of base) : 106937.dasm - Newtonsoft.Json.Utilities.EnumUtils:InternalFlagsFormat(Newtonsoft.Json.Utilities.EnumInfo,long):System.String
          -6 (-1.99% of base) : 102670.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocated(System.Collections.Generic.List`1[[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC, Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.65.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int):double
          -9 (-1.79% of base) : 102673.dasm - Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC:GetUserAllocatedPerHeap(System.Collections.Generic.List`1[[Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC, Microsoft.Diagnostics.Tracing.TraceEvent, Version=2.0.65.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]],Microsoft.Diagnostics.Tracing.Analysis.GC.TraceGC,int,int):double
          -9 (-1.65% of base) : 140495.dasm - ItemType:Create(int,System.Xml.Xsl.XmlQualifiedNameTest,System.Xml.Schema.XmlSchemaType,bool):System.Xml.Xsl.XmlQueryType
          -6 (-1.49% of base) : 113423.dasm - System.Data.SqlTypes.SqlDecimal:CalculatePrecision():ubyte:this
          -9 (-1.46% of base) : 107133.dasm - Newtonsoft.Json.Utilities.StringUtils:ToCamelCase(System.String):System.String

6 total methods with Code Size differences (6 improved, 0 regressed), 0 unchanged.


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


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 4900
Total bytes of diff: 4841
Total bytes of delta: -59 (-1.20% of base)
Total relative delta: -0.11
    diff is an improvement.
    relative diff is an improvement.
Detail diffs


Top file improvements (bytes):
         -14 : 244487.dasm (-2.07% of base)
         -10 : 121541.dasm (-2.58% of base)
         -10 : 11268.dasm (-1.30% of base)
          -9 : 241873.dasm (-2.37% of base)
          -9 : 237595.dasm (-2.37% of base)
          -7 : 82962.dasm (-0.30% of base)

6 total files with Code Size differences (6 improved, 0 regressed), 0 unchanged.

Top method improvements (bytes):
         -14 (-2.07% of base) : 244487.dasm - WebData.BaseLib.StringGen:GetIllegalXmlStringWithSeed(int,bool,int):System.String
         -10 (-2.58% of base) : 121541.dasm - Microsoft.Build.Graph.GraphBuilder:FormatCircularDependencyError(System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):System.String
         -10 (-1.30% of base) : 11268.dasm - Builder:Add(Microsoft.CodeAnalysis.Text.TextSpan,int):this
          -9 (-2.37% of base) : 241873.dasm - System.Data.SqlClient.TdsParser:TryProcessTableName(int,System.Data.SqlClient.TdsParserStateObject,byref):bool:this
          -9 (-2.37% of base) : 237595.dasm - System.Data.SqlClient.TdsParser:TryProcessTableName(int,System.Data.SqlClient.TdsParserStateObject,byref):bool:this
          -7 (-0.30% of base) : 82962.dasm - System.Text.Encodings.Web.Tests.UnicodeHelpersTests:ReadListOfDefinedCharacters():System.Boolean[]

Top method improvements (percentages):
         -10 (-2.58% of base) : 121541.dasm - Microsoft.Build.Graph.GraphBuilder:FormatCircularDependencyError(System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]):System.String
          -9 (-2.37% of base) : 241873.dasm - System.Data.SqlClient.TdsParser:TryProcessTableName(int,System.Data.SqlClient.TdsParserStateObject,byref):bool:this
          -9 (-2.37% of base) : 237595.dasm - System.Data.SqlClient.TdsParser:TryProcessTableName(int,System.Data.SqlClient.TdsParserStateObject,byref):bool:this
         -14 (-2.07% of base) : 244487.dasm - WebData.BaseLib.StringGen:GetIllegalXmlStringWithSeed(int,bool,int):System.String
         -10 (-1.30% of base) : 11268.dasm - Builder:Add(Microsoft.CodeAnalysis.Text.TextSpan,int):this
          -7 (-0.30% of base) : 82962.dasm - System.Text.Encodings.Web.Tests.UnicodeHelpersTests:ReadListOfDefinedCharacters():System.Boolean[]

6 total methods with Code Size differences (6 improved, 0 regressed), 0 unchanged.


The usual pattern that is being optimized now is array access with constant offsets:

-            mov     w4, #3
-            sxtw    x4, w4
-            lsl     x4, x4, #2
-            add     x4, x4, #16
-            ldr     w4, [x3, x4]
+            ldr     w4, [x3,#28]

@ghost ghost added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member labels Aug 17, 2021
@ghost
Copy link

ghost commented Aug 17, 2021

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

Issue Details

Apparently, such folding was disallowed, for unclear reasons likely pertaining to the fact that gtFoldExprConst is very old.

No SPMI diffs for linux-arm and win-x86 (as expected).

Small positive diffs for win-arm64 and win-x64, will post them once I rebase to the latest main and redownload all the collections (to undo the special handling of field sequences in fgMorphCommutative).

Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr, community-contribution

Milestone: -

@SingleAccretion SingleAccretion changed the title Allow folding of LONG nodes with field sequences Allow folding of LONG nodes with field sequences Aug 17, 2021
@SingleAccretion SingleAccretion force-pushed the Fix-FldSeq-For-Longs-In-gtFoldExprConst branch from 7b19097 to 8195125 Compare August 18, 2021 12:27
@SingleAccretion
Copy link
Contributor Author

SingleAccretion commented Aug 18, 2021

Failures are #57620, so this is ready for review now. Thanks to @echesakovMSFT for pointing out this inefficiency!

We may want to run the stress pipelines to not have surprises with the new assert.

@SingleAccretion SingleAccretion marked this pull request as ready for review August 18, 2021 16:15
@SingleAccretion SingleAccretion force-pushed the Fix-FldSeq-For-Longs-In-gtFoldExprConst branch from 8195125 to 2e91ad5 Compare September 1, 2021 14:27
Copy link
Contributor

@sandreenko sandreenko left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this.

@sandreenko
Copy link
Contributor

@echesakov is on vacation, PTAL @BruceForstall

@JulieLeeMSFT
Copy link
Member

@BruceForstall Please review and merge the community PR.

@BruceForstall
Copy link
Contributor

@SingleAccretion Can you fix the file conflict (and rebase)?

@SingleAccretion SingleAccretion force-pushed the Fix-FldSeq-For-Longs-In-gtFoldExprConst branch from 2e91ad5 to 95ff65a Compare September 17, 2021 02:09
Apparently, such folding was disallowed, for unclear reasons
likely pertaining to the fact that "gtFoldExprConst" is very old.
@SingleAccretion SingleAccretion force-pushed the Fix-FldSeq-For-Longs-In-gtFoldExprConst branch from 95ff65a to e5b3f43 Compare September 17, 2021 02:18
@SingleAccretion
Copy link
Contributor Author

@BruceForstall done.

Failures look like infrastructure issues:

D:\workspace\_work\1\s\artifacts\toolset\restore.proj : error : Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json.
...
Upload '/datadisks/disk1/workspace/_work/1/a/libraries_bin_Linux_musl_arm_Release.tar.gz' to file container: '#/8209333/libraries_bin_Linux_musl_arm_Release'
Async Command End: Upload Artifact
##[error]The HTTP request timed out after 00:01:40.
Finishing: Publish Build Assets

@BruceForstall BruceForstall merged commit 4090289 into dotnet:main Sep 17, 2021
@SingleAccretion SingleAccretion deleted the Fix-FldSeq-For-Longs-In-gtFoldExprConst branch September 17, 2021 21:01
@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 community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants