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

[JitDiff X64] [MichalPetryka] Fold null checks against known non-null values #791

Open
MihuBot opened this issue Nov 21, 2024 · 2 comments

Comments

@MihuBot
Copy link
Owner

MihuBot commented Nov 21, 2024

Job completed in 18 minutes 41 seconds.
dotnet/runtime#109164

Diffs

Found 266 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 39725461
Total bytes of diff: 39725443
Total bytes of delta: -18 (-0.00 % of base)
Total relative delta: -0.07
    diff is an improvement.
    relative diff is an improvement.


Top file improvements (bytes):
         -13 : System.Reflection.MetadataLoadContext.dasm (-0.01 % of base)
          -5 : System.Security.Cryptography.dasm (-0.00 % of base)

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

Top method improvements (bytes):
          -5 (-4.55 % of base) : System.Security.Cryptography.dasm - System.Security.Cryptography.HashProviderDispenser:KmacSupported(System.String):ubyte (FullOpts)
          -3 (-0.79 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.Ecma.EcmaModule:GetGenericInstantiation(System.Reflection.TypeLoading.RoType,System.Collections.Immutable.ImmutableArray`1[System.Reflection.TypeLoading.RoType]):System.Reflection.TypeLoading.RoType:this (FullOpts)
          -3 (-0.39 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.Ecma.EcmaResolver:ResolveAndSpecializeType(System.Reflection.Metadata.TypeDefinitionHandle,System.Reflection.TypeLoading.Ecma.EcmaModule,byref):System.Reflection.TypeLoading.RoInstantiationProviderType (FullOpts)
          -3 (-0.24 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.RoDefinitionType:MakeGenericType(System.Type[]):System.Type:this (FullOpts)
          -2 (-0.59 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.RoModule:GetUniqueArrayType(System.Reflection.TypeLoading.RoType,int):System.Reflection.TypeLoading.RoArrayType:this (FullOpts)
          -2 (-0.76 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.RoModule:GetUniqueConstructedGenericType(System.Reflection.TypeLoading.RoDefinitionType,System.Reflection.TypeLoading.RoType[]):System.Reflection.TypeLoading.RoConstructedGenericType:this (FullOpts)

Top method improvements (percentages):
          -5 (-4.55 % of base) : System.Security.Cryptography.dasm - System.Security.Cryptography.HashProviderDispenser:KmacSupported(System.String):ubyte (FullOpts)
          -3 (-0.79 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.Ecma.EcmaModule:GetGenericInstantiation(System.Reflection.TypeLoading.RoType,System.Collections.Immutable.ImmutableArray`1[System.Reflection.TypeLoading.RoType]):System.Reflection.TypeLoading.RoType:this (FullOpts)
          -2 (-0.76 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.RoModule:GetUniqueConstructedGenericType(System.Reflection.TypeLoading.RoDefinitionType,System.Reflection.TypeLoading.RoType[]):System.Reflection.TypeLoading.RoConstructedGenericType:this (FullOpts)
          -2 (-0.59 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.RoModule:GetUniqueArrayType(System.Reflection.TypeLoading.RoType,int):System.Reflection.TypeLoading.RoArrayType:this (FullOpts)
          -3 (-0.39 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.Ecma.EcmaResolver:ResolveAndSpecializeType(System.Reflection.Metadata.TypeDefinitionHandle,System.Reflection.TypeLoading.Ecma.EcmaModule,byref):System.Reflection.TypeLoading.RoInstantiationProviderType (FullOpts)
          -3 (-0.24 % of base) : System.Reflection.MetadataLoadContext.dasm - System.Reflection.TypeLoading.RoDefinitionType:MakeGenericType(System.Type[]):System.Type:this (FullOpts)

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

--------------------------------------------------------------------------------

Artifacts:

@MihuBot
Copy link
Owner Author

MihuBot commented Nov 21, 2024

Top method improvements

-5 (-4.55 % of base) - System.Security.Cryptography.HashProviderDispenser:KmacSupported(System.String):ubyte
 ; Assembly listing for method System.Security.Cryptography.HashProviderDispenser:KmacSupported(System.String):ubyte (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 4 single block inlinees; 0 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 arg0         [V00,T00] ( 10,  4.50)     ref  ->  rdi         class-hnd single-def <System.String>
-;  V01 loc0         [V01,T01] (  4,  2.50)   ubyte  ->  rax        
+;  V01 loc0         [V01,T01] (  3,  2   )   ubyte  ->  rax        
 ;# V02 OutArgs      [V02    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V03 tmp1         [V03    ] (  0,  0   )     ref  ->  zero-ref    single-def "spilling varStr"
 ;* V04 tmp2         [V04    ] (  0,  0   )     int  ->  zero-ref    "spilling unroll qmark"
 ;* V05 tmp3         [V05    ] (  0,  0   )     ref  ->  zero-ref    single-def "spilling varStr"
 ;* V06 tmp4         [V06    ] (  0,  0   )     int  ->  zero-ref    "spilling unroll qmark"
 ;
 ; Lcl frame size = 0
 
 G_M51753_IG01:
        push     rbp
        mov      rbp, rsp
 						;; size=4 bbWeight=1 PerfScore 1.25
 G_M51753_IG02:
        test     rdi, rdi
        je       SHORT G_M51753_IG04
 						;; size=5 bbWeight=1 PerfScore 1.25
 G_M51753_IG03:
        cmp      dword ptr [rdi+0x08], 7
        je       SHORT G_M51753_IG08
 						;; size=6 bbWeight=0.25 PerfScore 1.00
 G_M51753_IG04:
        test     rdi, rdi
-       je       SHORT G_M51753_IG07
+       je       SHORT G_M51753_IG09
 						;; size=5 bbWeight=0.50 PerfScore 0.62
 G_M51753_IG05:
        cmp      dword ptr [rdi+0x08], 7
-       jne      SHORT G_M51753_IG07
+       jne      SHORT G_M51753_IG09
 						;; size=6 bbWeight=0.25 PerfScore 1.00
 G_M51753_IG06:
        mov      rax, 0xD1FFAB1E
        xor      rax, qword ptr [rdi+0x0C]
        mov      rcx, 0xD1FFAB1E
        xor      rcx, qword ptr [rdi+0x12]
        or       rax, rcx
-       je       SHORT G_M51753_IG10
+       jne      SHORT G_M51753_IG09
 						;; size=33 bbWeight=0.12 PerfScore 0.97
 G_M51753_IG07:
-       xor      eax, eax
-       jmp      SHORT G_M51753_IG11
-						;; size=4 bbWeight=0.50 PerfScore 1.12
+       mov      eax, 1
+       jmp      SHORT G_M51753_IG10
+						;; size=7 bbWeight=0.50 PerfScore 1.12
 G_M51753_IG08:
        mov      rax, 0xD1FFAB1E
        xor      rax, qword ptr [rdi+0x0C]
        mov      rcx, 0xD1FFAB1E
        xor      rcx, qword ptr [rdi+0x12]
        or       rax, rcx
-       jne      SHORT G_M51753_IG05
-						;; size=33 bbWeight=0.12 PerfScore 0.97
+       je       SHORT G_M51753_IG07
+       jmp      SHORT G_M51753_IG05
+						;; size=35 bbWeight=0.12 PerfScore 1.22
 G_M51753_IG09:
-       mov      eax, 1
-       jmp      SHORT G_M51753_IG11
-						;; size=7 bbWeight=0.50 PerfScore 1.12
+       xor      eax, eax
+						;; size=2 bbWeight=0.50 PerfScore 0.12
 G_M51753_IG10:
-       mov      eax, 1
-						;; size=5 bbWeight=0.50 PerfScore 0.12
-G_M51753_IG11:
        pop      rbp
        ret      
 						;; size=2 bbWeight=1 PerfScore 1.50
 
-; Total bytes of code 110, prolog size 4, PerfScore 10.94, instruction count 29, allocated bytes for code 110 (MethodHash=dfbd35d6) for method System.Security.Cryptography.HashProviderDispenser:KmacSupported(System.String):ubyte (FullOpts)
+; Total bytes of code 105, prolog size 4, PerfScore 10.06, instruction count 28, allocated bytes for code 105 (MethodHash=dfbd35d6) for method System.Security.Cryptography.HashProviderDispenser:KmacSupported(System.String):ubyte (FullOpts)
 ; ============================================================
-3 (-0.79 % of base) - System.Reflection.TypeLoading.Ecma.EcmaModule:GetGenericInstantiation(System.Reflection.TypeLoading.RoType,System.Collections.Immutable.ImmutableArray`1[System.Reflection.TypeLoading.RoType]):System.Reflection.TypeLoading.RoType:this
 ; Assembly listing for method System.Reflection.TypeLoading.Ecma.EcmaModule:GetGenericInstantiation(System.Reflection.TypeLoading.RoType,System.Collections.Immutable.ImmutableArray`1[System.Reflection.TypeLoading.RoType]):System.Reflection.TypeLoading.RoType:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 4 single block inlinees; 2 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;* V00 this         [V00    ] (  0,  0   )     ref  ->  zero-ref    this class-hnd single-def <System.Reflection.TypeLoading.Ecma.EcmaModule>
-;  V01 arg1         [V01,T02] (  3,  3   )     ref  ->  rsi         class-hnd single-def <System.Reflection.TypeLoading.RoType>
+;  V01 arg1         [V01,T01] (  3,  3   )     ref  ->  rsi         class-hnd single-def <System.Reflection.TypeLoading.RoType>
 ;* V02 arg2         [V02    ] (  0,  0   )  struct ( 8) zero-ref    single-def <System.Collections.Immutable.ImmutableArray`1[System.Reflection.TypeLoading.RoType]>
 ;  V03 OutArgs      [V03    ] (  1,  1   )  struct (24) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;  V04 tmp1         [V04,T00] (  5, 10   )     ref  ->  r15         class-hnd single-def "dup spill" <System.Reflection.TypeLoading.RoDefinitionType>
 ;* V05 tmp2         [V05    ] (  0,  0   )     ref  ->  zero-ref    single-def
 ;  V06 tmp3         [V06,T16] (  3,  0   )     ref  ->  rbx         class-hnd exact single-def "NewObj constructor temp" <System.BadImageFormatException>
 ;  V07 tmp4         [V07,T05] (  2,  4   )     ref  ->  rbx         class-hnd single-def "Inlining Arg" <System.__Canon[]>
 ;* V08 tmp5         [V08    ] (  0,  0   )     ref  ->  zero-ref    class-hnd "Inlining Arg" <System.Reflection.TypeLoading.RoModule>
 ;* V09 tmp6         [V09    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op "NewObj constructor temp" <System.Reflection.TypeLoading.RoConstructedGenericType+Key>
-;  V10 tmp7         [V10,T01] (  4,  7   )     ref  ->  r14         class-hnd single-def "impAppendStmt" <System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Reflection.TypeLoading.RoConstructedGenericType]>
+;  V10 tmp7         [V10,T02] (  3,  5   )     ref  ->  r14         class-hnd single-def "impAppendStmt" <System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Reflection.TypeLoading.RoConstructedGenericType]>
 ;  V11 tmp8         [V11,T12] (  2,  2   )     ref  ->  rax         class-hnd exact single-def "Inline return value spill temp" <System.Reflection.TypeLoading.RoConstructedGenericType>
 ;* V12 tmp9         [V12    ] (  0,  0   )  struct (16) zero-ref    "Inlining Arg" <System.Reflection.TypeLoading.RoConstructedGenericType+Key>
 ;  V13 tmp10        [V13,T07] (  4,  3.50)     ref  ->  r13         class-hnd single-def "Inline stloc first use temp" <System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Reflection.TypeLoading.RoConstructedGenericType]>
 ;  V14 tmp11        [V14,T11] (  3,  2.50)     ref  ->  rdi         class-hnd single-def "Inline stloc first use temp" <System.Collections.Generic.IEqualityComparer`1[System.Reflection.TypeLoading.RoConstructedGenericType+Key]>
 ;* V15 tmp12        [V15    ] (  0,  0   )     int  ->  zero-ref    "Inline stloc first use temp"
 ;  V16 tmp13        [V16    ] (  3,  2.50)     ref  ->  [rbp-0x30]  do-not-enreg[X] must-init addr-exposed ld-addr-op class-hnd "Inline ldloca(s) first use temp" <System.Reflection.TypeLoading.RoConstructedGenericType>
 ;* V17 tmp14        [V17    ] (  0,  0   )  struct ( 8) zero-ref    ld-addr-op "NewObj constructor temp" <System.Nullable`1[int]>
 ;* V18 tmp15        [V18    ] (  0,  0   )  struct ( 8) zero-ref    "non-inline candidate call" <System.Nullable`1[int]>
 ;  V19 tmp16        [V19,T10] (  4,  2.50)     int  ->  r12         "Inline return value spill temp"
 ;  V20 tmp17        [V20    ] (  5,  7   )  struct (16) [rbp-0x40]  do-not-enreg[XSA] multireg-arg must-init addr-exposed ld-addr-op "Inlining Arg" <System.Reflection.TypeLoading.RoConstructedGenericType+Key>
 ;  V21 tmp18        [V21,T06] (  2,  2   )     ref  ->  rbx         single-def "field V02.array (fldOffset=0x0)" P-INDEP
 ;  V22 tmp19        [V22,T03] (  5,  4   )     ref  ->  r15         single-def "field V09.<GenericTypeDefinition>k__BackingField (fldOffset=0x0)" P-INDEP
 ;  V23 tmp20        [V23,T04] (  5,  4   )     ref  ->  rbx         single-def "field V09.<GenericTypeArguments>k__BackingField (fldOffset=0x8)" P-INDEP
 ;* V24 tmp21        [V24    ] (  0,  0   )     ref  ->  zero-ref    single-def "field V12.<GenericTypeDefinition>k__BackingField (fldOffset=0x0)" P-INDEP
 ;* V25 tmp22        [V25    ] (  0,  0   )     ref  ->  zero-ref    single-def "field V12.<GenericTypeArguments>k__BackingField (fldOffset=0x8)" P-INDEP
 ;* V26 tmp23        [V26,T15] (  0,  0   )   ubyte  ->  zero-ref    "field V17.hasValue (fldOffset=0x0)" P-INDEP
 ;  V27 tmp24        [V27,T14] (  2,  1   )     int  ->  r12         "field V17.value (fldOffset=0x4)" P-INDEP
 ;* V28 tmp25        [V28    ] (  0,  0   )   ubyte  ->  zero-ref    "field V18.hasValue (fldOffset=0x0)" P-INDEP
 ;* V29 tmp26        [V29    ] (  0,  0   )     int  ->  zero-ref    "field V18.value (fldOffset=0x4)" P-INDEP
 ;  V30 tmp27        [V30    ] (  3,  2.50)     ref  ->  [rbp-0x40]  do-not-enreg[X] addr-exposed "field V20.<GenericTypeDefinition>k__BackingField (fldOffset=0x0)" P-DEP
 ;  V31 tmp28        [V31    ] (  3,  2.50)     ref  ->  [rbp-0x38]  do-not-enreg[X] addr-exposed "field V20.<GenericTypeArguments>k__BackingField (fldOffset=0x8)" P-DEP
 ;  V32 tmp29        [V32,T09] (  3,  3   )  struct ( 8) [rbp-0x48]  do-not-enreg[SF] "by-value struct argument" <System.Nullable`1[int]>
 ;  V33 tmp30        [V33,T13] (  2,  2   )     ref  ->   r9         single-def "argument with side effect"
 ;  V34 rat0         [V34,T08] (  3,  3   )     ref  ->  rax         "delegate invoke call"
 ;
 ; Lcl frame size = 56
 
 G_M47986_IG01:
        push     rbp
        push     r15
        push     r14
        push     r13
        push     r12
        push     rbx
        sub      rsp, 56
        lea      rbp, [rsp+0x60]
        vxorps   xmm8, xmm8, xmm8
        vmovdqa  xmmword ptr [rbp-0x40], xmm8
        xor      eax, eax
        mov      qword ptr [rbp-0x30], rax
        mov      rbx, rdx
 						;; size=38 bbWeight=1 PerfScore 10.58
 G_M47986_IG02:
        mov      rdi, 0xD1FFAB1E      ; System.Reflection.TypeLoading.RoDefinitionType
        mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_ISINSTANCEOFCLASS
        call     [rax]CORINFO_HELP_ISINSTANCEOFCLASS
        mov      r15, rax
        test     r15, r15
        je       G_M47986_IG09
        mov      rsi, rbx
        mov      rdi, 0xD1FFAB1E      ; System.Linq.ImmutableArrayExtensions:ToArray[System.Reflection.TypeLoading.RoType](System.Collections.Immutable.ImmutableArray`1[System.Reflection.TypeLoading.RoType]):System.Reflection.TypeLoading.RoType[]
        mov      rax, 0xD1FFAB1E      ; code for System.Linq.ImmutableArrayExtensions:ToArray[System.__Canon](System.Collections.Immutable.ImmutableArray`1[System.__Canon]):System.__Canon[]
        call     [rax]System.Linq.ImmutableArrayExtensions:ToArray[System.__Canon](System.Collections.Immutable.ImmutableArray`1[System.__Canon]):System.__Canon[]
        mov      rbx, rax
        mov      rdi, r15
        mov      rax, qword ptr [r15]
        mov      rax, qword ptr [rax+0xC8]
        call     [rax+0x30]System.Reflection.TypeLoading.RoType:GetRoModule():System.Reflection.TypeLoading.RoModule:this
        mov      r14, gword ptr [rax+0x38]
-       cmp      byte  ptr [r14], r14b
        mov      r13, gword ptr [r14+0x08]
        mov      rdi, gword ptr [r13+0x08]
        mov      gword ptr [rbp-0x40], r15
        mov      gword ptr [rbp-0x38], rbx
        test     rdi, rdi
        jne      SHORT G_M47986_IG04
-						;; size=106 bbWeight=1 PerfScore 28.50
+						;; size=103 bbWeight=1 PerfScore 25.50
 G_M47986_IG03:
        lea      rdi, [rbp-0x40]
        mov      rax, 0xD1FFAB1E      ; code for System.Reflection.TypeLoading.RoConstructedGenericType+Key:GetHashCode():int:this
        call     [rax]System.Reflection.TypeLoading.RoConstructedGenericType+Key:GetHashCode():int:this
        mov      r12d, eax
        jmp      SHORT G_M47986_IG05
 						;; size=21 bbWeight=0.50 PerfScore 3.00
 G_M47986_IG04:
        mov      rsi, gword ptr [rbp-0x40]
        mov      rdx, gword ptr [rbp-0x38]
        mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[System.Reflection.TypeLoading.RoConstructedGenericType+Key]:GetHashCode(System.Reflection.TypeLoading.RoConstructedGenericType+Key):int:this
        call     [r11]System.Collections.Generic.IEqualityComparer`1[System.Reflection.TypeLoading.RoConstructedGenericType+Key]:GetHashCode(System.Reflection.TypeLoading.RoConstructedGenericType+Key):int:this
        mov      r12d, eax
 						;; size=24 bbWeight=0.50 PerfScore 2.75
 G_M47986_IG05:
        mov      rdx, r15
        mov      rcx, rbx
        lea      r9, [rbp-0x30]
        mov      rsi, r13
        mov      r8d, r12d
        mov      rdi, 0xD1FFAB1E      ; System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Reflection.TypeLoading.RoConstructedGenericType]
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:TryGetValueInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon],System.Reflection.TypeLoading.RoConstructedGenericType+Key,int,byref):ubyte
        call     [rax]System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:TryGetValueInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon],System.Reflection.TypeLoading.RoConstructedGenericType+Key,int,byref):ubyte
        test     eax, eax
        jne      SHORT G_M47986_IG07
 						;; size=42 bbWeight=1 PerfScore 6.25
 G_M47986_IG06:
        mov      byte  ptr [rbp-0x48], 1
        mov      dword ptr [rbp-0x44], r12d
        mov      rsi, r15
        mov      rdx, rbx
        mov      rdi, 0xD1FFAB1E      ; const ptr
        mov      rax, gword ptr [rdi]
        mov      rdi, gword ptr [rax+0x08]
        call     [rax+0x18]System.Func`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:Invoke(System.Reflection.TypeLoading.RoConstructedGenericType+Key):System.__Canon:this
        mov      r9, rax
        xor      r8d, r8d
        mov      dword ptr [rsp], r8d
        mov      dword ptr [rsp+0x08], 1
        lea      r8, [rbp-0x30]
        mov      qword ptr [rsp+0x10], r8
        mov      r8, qword ptr [rbp-0x48]
        mov      rdx, r15
        mov      rcx, rbx
        mov      rsi, r13
        mov      rdi, r14
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:TryAddInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon],System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Nullable`1[int],System.__Canon,ubyte,ubyte,byref):ubyte:this
        call     [rax]System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:TryAddInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon],System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Nullable`1[int],System.__Canon,ubyte,ubyte,byref):ubyte:this
 						;; size=89 bbWeight=0.50 PerfScore 9.50
 G_M47986_IG07:
        mov      rax, gword ptr [rbp-0x30]
 						;; size=4 bbWeight=1 PerfScore 1.00
 G_M47986_IG08:
        add      rsp, 56
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=1 PerfScore 4.25
 G_M47986_IG09:
        mov      rdi, 0xD1FFAB1E      ; System.BadImageFormatException
        call     CORINFO_HELP_NEWSFAST
        mov      rbx, rax
        mov      rdi, rbx
        mov      rax, 0xD1FFAB1E      ; code for System.BadImageFormatException:.ctor():this
        call     [rax]System.BadImageFormatException:.ctor():this
        mov      rdi, rbx
        call     CORINFO_HELP_THROW
        int3     
 						;; size=42 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 381, prolog size 35, PerfScore 65.83, instruction count 95, allocated bytes for code 381 (MethodHash=5e83448d) for method System.Reflection.TypeLoading.Ecma.EcmaModule:GetGenericInstantiation(System.Reflection.TypeLoading.RoType,System.Collections.Immutable.ImmutableArray`1[System.Reflection.TypeLoading.RoType]):System.Reflection.TypeLoading.RoType:this (FullOpts)
+; Total bytes of code 378, prolog size 35, PerfScore 62.83, instruction count 94, allocated bytes for code 378 (MethodHash=5e83448d) for method System.Reflection.TypeLoading.Ecma.EcmaModule:GetGenericInstantiation(System.Reflection.TypeLoading.RoType,System.Collections.Immutable.ImmutableArray`1[System.Reflection.TypeLoading.RoType]):System.Reflection.TypeLoading.RoType:this (FullOpts)
 ; ============================================================
-2 (-0.59 % of base) - System.Reflection.TypeLoading.RoModule:GetUniqueArrayType(System.Reflection.TypeLoading.RoType,int):System.Reflection.TypeLoading.RoArrayType:this
 ; Assembly listing for method System.Reflection.TypeLoading.RoModule:GetUniqueArrayType(System.Reflection.TypeLoading.RoType,int):System.Reflection.TypeLoading.RoArrayType:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 2 single block inlinees; 2 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T03] (  3,  2.50)     ref  ->  rbx         this class-hnd single-def <System.Reflection.TypeLoading.RoModule>
 ;  V01 arg1         [V01,T00] (  3,  3   )     ref  ->  rsi         class-hnd single-def <System.Reflection.TypeLoading.RoType>
 ;  V02 arg2         [V02,T01] (  3,  3   )     int  ->  rdx         single-def
 ;* V03 loc0         [V03    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op <System.Reflection.TypeLoading.RoArrayType+Key>
 ;  V04 OutArgs      [V04    ] (  1,  1   )  struct (24) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;  V05 tmp1         [V05,T13] (  2,  1   )     ref  ->  rax         class-hnd exact single-def "Inline return value spill temp" <System.Reflection.TypeLoading.RoArrayType>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    "Inlining Arg" <System.Reflection.TypeLoading.RoArrayType+Key>
-;  V07 tmp3         [V07,T04] (  4,  4   )     ref  ->  rbx         class-hnd single-def "Inlining Arg" <System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoArrayType+Key,System.Reflection.TypeLoading.RoArrayType]>
+;  V07 tmp3         [V07,T05] (  3,  3   )     ref  ->  rbx         class-hnd single-def "Inlining Arg" <System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoArrayType+Key,System.Reflection.TypeLoading.RoArrayType]>
 ;  V08 tmp4         [V08,T09] (  4,  2   )     ref  ->  r13         class-hnd single-def "Inline stloc first use temp" <System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoArrayType+Key,System.Reflection.TypeLoading.RoArrayType]>
 ;  V09 tmp5         [V09,T12] (  3,  1.50)     ref  ->  rdi         class-hnd single-def "Inline stloc first use temp" <System.Collections.Generic.IEqualityComparer`1[System.Reflection.TypeLoading.RoArrayType+Key]>
 ;* V10 tmp6         [V10    ] (  0,  0   )     int  ->  zero-ref    single-def "Inline stloc first use temp"
 ;  V11 tmp7         [V11    ] (  3,  1.50)     ref  ->  [rbp-0x30]  do-not-enreg[X] must-init addr-exposed ld-addr-op class-hnd "Inline ldloca(s) first use temp" <System.Reflection.TypeLoading.RoArrayType>
 ;* V12 tmp8         [V12    ] (  0,  0   )  struct ( 8) zero-ref    ld-addr-op "NewObj constructor temp" <System.Nullable`1[int]>
 ;* V13 tmp9         [V13    ] (  0,  0   )  struct ( 8) zero-ref    "non-inline candidate call" <System.Nullable`1[int]>
 ;  V14 tmp10        [V14,T10] (  4,  2   )     int  ->  r12         "Inline return value spill temp"
 ;  V15 tmp11        [V15    ] (  5,  5   )  struct (16) [rbp-0x40]  do-not-enreg[XSA] multireg-arg must-init addr-exposed ld-addr-op "Inlining Arg" <System.Reflection.TypeLoading.RoArrayType+Key>
 ;  V16 tmp12        [V16,T02] (  7,  4.50)     ref  ->  r15         single-def "field V03.<ElementType>k__BackingField (fldOffset=0x0)" P-INDEP
-;  V17 tmp13        [V17,T05] (  6,  3.50)     int  ->  r14         single-def "field V03.<Rank>k__BackingField (fldOffset=0x8)" P-INDEP
+;  V17 tmp13        [V17,T04] (  6,  3.50)     int  ->  r14         single-def "field V03.<Rank>k__BackingField (fldOffset=0x8)" P-INDEP
 ;* V18 tmp14        [V18    ] (  0,  0   )     ref  ->  zero-ref    single-def "field V06.<ElementType>k__BackingField (fldOffset=0x0)" P-INDEP
 ;* V19 tmp15        [V19    ] (  0,  0   )     int  ->  zero-ref    single-def "field V06.<Rank>k__BackingField (fldOffset=0x8)" P-INDEP
 ;* V20 tmp16        [V20,T15] (  0,  0   )   ubyte  ->  zero-ref    single-def "field V12.hasValue (fldOffset=0x0)" P-INDEP
 ;  V21 tmp17        [V21,T14] (  2,  1   )     int  ->  r12         single-def "field V12.value (fldOffset=0x4)" P-INDEP
 ;* V22 tmp18        [V22    ] (  0,  0   )   ubyte  ->  zero-ref    "field V13.hasValue (fldOffset=0x0)" P-INDEP
 ;* V23 tmp19        [V23    ] (  0,  0   )     int  ->  zero-ref    "field V13.value (fldOffset=0x4)" P-INDEP
 ;  V24 tmp20        [V24    ] (  3,  2   )     ref  ->  [rbp-0x40]  do-not-enreg[X] addr-exposed "field V15.<ElementType>k__BackingField (fldOffset=0x0)" P-DEP
 ;  V25 tmp21        [V25    ] (  3,  2   )     int  ->  [rbp-0x38]  do-not-enreg[X] addr-exposed "field V15.<Rank>k__BackingField (fldOffset=0x8)" P-DEP
 ;  V26 tmp22        [V26,T08] (  3,  3   )  struct ( 8) [rbp-0x48]  do-not-enreg[SF] "by-value struct argument" <System.Nullable`1[int]>
 ;  V27 tmp23        [V27,T11] (  2,  2   )     ref  ->   r9         single-def "argument with side effect"
 ;  V28 rat0         [V28,T06] (  3,  3   )     ref  ->  rax         "delegate invoke call"
 ;  V29 rat1         [V29,T07] (  3,  3   )     ref  ->  rax         "delegate invoke call"
 ;
 ; Lcl frame size = 56
 
 G_M7824_IG01:
        push     rbp
        push     r15
        push     r14
        push     r13
        push     r12
        push     rbx
        sub      rsp, 56
        lea      rbp, [rsp+0x60]
        vxorps   xmm8, xmm8, xmm8
        vmovdqa  xmmword ptr [rbp-0x40], xmm8
        xor      eax, eax
        mov      qword ptr [rbp-0x30], rax
        mov      rbx, rdi
 						;; size=38 bbWeight=1 PerfScore 10.58
 G_M7824_IG02:
        mov      r15, rsi
        mov      r14d, edx
        mov      rsi, r15
        mov      rdi, 0xD1FFAB1E      ; System.Reflection.RoModifiedType
        mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_ISINSTANCEOFCLASS
        call     [rax]CORINFO_HELP_ISINSTANCEOFCLASS
        test     rax, rax
        je       SHORT G_M7824_IG05
 						;; size=36 bbWeight=1 PerfScore 5.50
 G_M7824_IG03:
        mov      rsi, r15
        mov      edx, r14d
        mov      rdi, 0xD1FFAB1E      ; const ptr
        mov      rax, gword ptr [rdi]
        mov      rdi, gword ptr [rax+0x08]
        call     [rax+0x18]System.Func`2[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon]:Invoke(System.Reflection.TypeLoading.RoArrayType+Key):System.__Canon:this
        nop      
 						;; size=27 bbWeight=0.50 PerfScore 4.00
 G_M7824_IG04:
        add      rsp, 56
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=0.50 PerfScore 2.12
 G_M7824_IG05:
        mov      rbx, gword ptr [rbx+0x20]
-       cmp      byte  ptr [rbx], bl
        mov      r13, gword ptr [rbx+0x08]
        mov      rdi, gword ptr [r13+0x08]
        mov      gword ptr [rbp-0x40], r15
        mov      dword ptr [rbp-0x38], r14d
        test     rdi, rdi
        jne      SHORT G_M7824_IG06
        lea      rdi, [rbp-0x40]
        mov      rax, 0xD1FFAB1E      ; code for System.Reflection.TypeLoading.RoArrayType+Key:GetHashCode():int:this
        call     [rax]System.Reflection.TypeLoading.RoArrayType+Key:GetHashCode():int:this
        mov      r12d, eax
        jmp      SHORT G_M7824_IG07
-						;; size=48 bbWeight=0.50 PerfScore 9.12
+						;; size=46 bbWeight=0.50 PerfScore 7.62
 G_M7824_IG06:
        mov      rsi, gword ptr [rbp-0x40]
        mov      edx, dword ptr [rbp-0x38]
        mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[System.Reflection.TypeLoading.RoArrayType+Key]:GetHashCode(System.Reflection.TypeLoading.RoArrayType+Key):int:this
        call     [r11]System.Collections.Generic.IEqualityComparer`1[System.Reflection.TypeLoading.RoArrayType+Key]:GetHashCode(System.Reflection.TypeLoading.RoArrayType+Key):int:this
        mov      r12d, eax
 						;; size=23 bbWeight=0.50 PerfScore 2.75
 G_M7824_IG07:
        mov      rdx, r15
        mov      ecx, r14d
        lea      r9, [rbp-0x30]
        mov      rsi, r13
        mov      r8d, r12d
        mov      rdi, 0xD1FFAB1E      ; System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoArrayType+Key,System.Reflection.TypeLoading.RoArrayType]
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon]:TryGetValueInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon],System.Reflection.TypeLoading.RoArrayType+Key,int,byref):ubyte
        call     [rax]System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon]:TryGetValueInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon],System.Reflection.TypeLoading.RoArrayType+Key,int,byref):ubyte
        test     eax, eax
        jne      SHORT G_M7824_IG08
        mov      byte  ptr [rbp-0x48], 1
        mov      dword ptr [rbp-0x44], r12d
        mov      rsi, r15
        mov      edx, r14d
        mov      rdi, 0xD1FFAB1E      ; const ptr
        mov      rax, gword ptr [rdi]
        mov      rdi, gword ptr [rax+0x08]
        call     [rax+0x18]System.Func`2[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon]:Invoke(System.Reflection.TypeLoading.RoArrayType+Key):System.__Canon:this
        mov      r9, rax
        xor      r8d, r8d
        mov      dword ptr [rsp], r8d
        mov      dword ptr [rsp+0x08], 1
        lea      r8, [rbp-0x30]
        mov      qword ptr [rsp+0x10], r8
        mov      r8, qword ptr [rbp-0x48]
        mov      rdx, r15
        mov      ecx, r14d
        mov      rsi, r13
        mov      rdi, rbx
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon]:TryAddInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon],System.Reflection.TypeLoading.RoArrayType+Key,System.Nullable`1[int],System.__Canon,ubyte,ubyte,byref):ubyte:this
        call     [rax]System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon]:TryAddInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoArrayType+Key,System.__Canon],System.Reflection.TypeLoading.RoArrayType+Key,System.Nullable`1[int],System.__Canon,ubyte,ubyte,byref):ubyte:this
 						;; size=131 bbWeight=0.50 PerfScore 12.62
 G_M7824_IG08:
        mov      rax, gword ptr [rbp-0x30]
 						;; size=4 bbWeight=0.50 PerfScore 0.50
 G_M7824_IG09:
        add      rsp, 56
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=0.50 PerfScore 2.12
 
-; Total bytes of code 337, prolog size 35, PerfScore 49.33, instruction count 94, allocated bytes for code 337 (MethodHash=69cae16f) for method System.Reflection.TypeLoading.RoModule:GetUniqueArrayType(System.Reflection.TypeLoading.RoType,int):System.Reflection.TypeLoading.RoArrayType:this (FullOpts)
+; Total bytes of code 335, prolog size 35, PerfScore 47.83, instruction count 93, allocated bytes for code 335 (MethodHash=69cae16f) for method System.Reflection.TypeLoading.RoModule:GetUniqueArrayType(System.Reflection.TypeLoading.RoType,int):System.Reflection.TypeLoading.RoArrayType:this (FullOpts)
 ; ============================================================
-2 (-0.76 % of base) - System.Reflection.TypeLoading.RoModule:GetUniqueConstructedGenericType(System.Reflection.TypeLoading.RoDefinitionType,System.Reflection.TypeLoading.RoType[]):System.Reflection.TypeLoading.RoConstructedGenericType:this
 ; Assembly listing for method System.Reflection.TypeLoading.RoModule:GetUniqueConstructedGenericType(System.Reflection.TypeLoading.RoDefinitionType,System.Reflection.TypeLoading.RoType[]):System.Reflection.TypeLoading.RoConstructedGenericType:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 2 single block inlinees; 2 inlinees without PGO data
 ; Final local variable assignments
 ;
-;  V00 this         [V00,T01] (  3,  3   )     ref  ->  rdi         this class-hnd single-def <System.Reflection.TypeLoading.RoModule>
-;  V01 arg1         [V01,T02] (  3,  3   )     ref  ->  rsi         class-hnd single-def <System.Reflection.TypeLoading.RoDefinitionType>
-;  V02 arg2         [V02,T03] (  3,  3   )     ref  ->  rdx         class-hnd single-def <System.Reflection.TypeLoading.RoType[]>
+;  V00 this         [V00,T00] (  3,  3   )     ref  ->  rdi         this class-hnd single-def <System.Reflection.TypeLoading.RoModule>
+;  V01 arg1         [V01,T01] (  3,  3   )     ref  ->  rsi         class-hnd single-def <System.Reflection.TypeLoading.RoDefinitionType>
+;  V02 arg2         [V02,T02] (  3,  3   )     ref  ->  rdx         class-hnd single-def <System.Reflection.TypeLoading.RoType[]>
 ;  V03 OutArgs      [V03    ] (  1,  1   )  struct (24) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V04 tmp1         [V04    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op "NewObj constructor temp" <System.Reflection.TypeLoading.RoConstructedGenericType+Key>
-;  V05 tmp2         [V05,T00] (  4,  7   )     ref  ->  rbx         class-hnd single-def "impAppendStmt" <System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Reflection.TypeLoading.RoConstructedGenericType]>
+;  V05 tmp2         [V05,T03] (  3,  5   )     ref  ->  rbx         class-hnd single-def "impAppendStmt" <System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Reflection.TypeLoading.RoConstructedGenericType]>
 ;  V06 tmp3         [V06,T11] (  2,  2   )     ref  ->  rax         class-hnd exact single-def "Inline return value spill temp" <System.Reflection.TypeLoading.RoConstructedGenericType>
 ;* V07 tmp4         [V07    ] (  0,  0   )  struct (16) zero-ref    "Inlining Arg" <System.Reflection.TypeLoading.RoConstructedGenericType+Key>
 ;  V08 tmp5         [V08,T06] (  4,  3.50)     ref  ->  r13         class-hnd single-def "Inline stloc first use temp" <System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Reflection.TypeLoading.RoConstructedGenericType]>
 ;  V09 tmp6         [V09,T10] (  3,  2.50)     ref  ->  rdi         class-hnd single-def "Inline stloc first use temp" <System.Collections.Generic.IEqualityComparer`1[System.Reflection.TypeLoading.RoConstructedGenericType+Key]>
 ;* V10 tmp7         [V10    ] (  0,  0   )     int  ->  zero-ref    "Inline stloc first use temp"
 ;  V11 tmp8         [V11    ] (  3,  2.50)     ref  ->  [rbp-0x30]  do-not-enreg[X] must-init addr-exposed ld-addr-op class-hnd "Inline ldloca(s) first use temp" <System.Reflection.TypeLoading.RoConstructedGenericType>
 ;* V12 tmp9         [V12    ] (  0,  0   )  struct ( 8) zero-ref    ld-addr-op "NewObj constructor temp" <System.Nullable`1[int]>
 ;* V13 tmp10        [V13    ] (  0,  0   )  struct ( 8) zero-ref    "non-inline candidate call" <System.Nullable`1[int]>
 ;  V14 tmp11        [V14,T09] (  4,  2.50)     int  ->  r12         "Inline return value spill temp"
 ;  V15 tmp12        [V15    ] (  5,  7   )  struct (16) [rbp-0x40]  do-not-enreg[XSA] multireg-arg must-init addr-exposed ld-addr-op "Inlining Arg" <System.Reflection.TypeLoading.RoConstructedGenericType+Key>
 ;  V16 tmp13        [V16,T04] (  5,  4   )     ref  ->  r15         single-def "field V04.<GenericTypeDefinition>k__BackingField (fldOffset=0x0)" P-INDEP
 ;  V17 tmp14        [V17,T05] (  5,  4   )     ref  ->  r14         single-def "field V04.<GenericTypeArguments>k__BackingField (fldOffset=0x8)" P-INDEP
 ;* V18 tmp15        [V18    ] (  0,  0   )     ref  ->  zero-ref    single-def "field V07.<GenericTypeDefinition>k__BackingField (fldOffset=0x0)" P-INDEP
 ;* V19 tmp16        [V19    ] (  0,  0   )     ref  ->  zero-ref    single-def "field V07.<GenericTypeArguments>k__BackingField (fldOffset=0x8)" P-INDEP
 ;* V20 tmp17        [V20,T14] (  0,  0   )   ubyte  ->  zero-ref    "field V12.hasValue (fldOffset=0x0)" P-INDEP
 ;  V21 tmp18        [V21,T13] (  2,  1   )     int  ->  r12         "field V12.value (fldOffset=0x4)" P-INDEP
 ;* V22 tmp19        [V22    ] (  0,  0   )   ubyte  ->  zero-ref    "field V13.hasValue (fldOffset=0x0)" P-INDEP
 ;* V23 tmp20        [V23    ] (  0,  0   )     int  ->  zero-ref    "field V13.value (fldOffset=0x4)" P-INDEP
 ;  V24 tmp21        [V24    ] (  3,  2.50)     ref  ->  [rbp-0x40]  do-not-enreg[X] addr-exposed "field V15.<GenericTypeDefinition>k__BackingField (fldOffset=0x0)" P-DEP
 ;  V25 tmp22        [V25    ] (  3,  2.50)     ref  ->  [rbp-0x38]  do-not-enreg[X] addr-exposed "field V15.<GenericTypeArguments>k__BackingField (fldOffset=0x8)" P-DEP
 ;  V26 tmp23        [V26,T08] (  3,  3   )  struct ( 8) [rbp-0x48]  do-not-enreg[SF] "by-value struct argument" <System.Nullable`1[int]>
 ;  V27 tmp24        [V27,T12] (  2,  2   )     ref  ->   r9         single-def "argument with side effect"
 ;  V28 rat0         [V28,T07] (  3,  3   )     ref  ->  rax         "delegate invoke call"
 ;
 ; Lcl frame size = 56
 
 G_M59943_IG01:
        push     rbp
        push     r15
        push     r14
        push     r13
        push     r12
        push     rbx
        sub      rsp, 56
        lea      rbp, [rsp+0x60]
        vxorps   xmm8, xmm8, xmm8
        vmovdqa  xmmword ptr [rbp-0x40], xmm8
        xor      eax, eax
        mov      qword ptr [rbp-0x30], rax
 						;; size=35 bbWeight=1 PerfScore 10.33
 G_M59943_IG02:
        mov      rbx, gword ptr [rdi+0x38]
        mov      r15, rsi
        mov      r14, rdx
-       cmp      byte  ptr [rbx], bl
        mov      r13, gword ptr [rbx+0x08]
        mov      rdi, gword ptr [r13+0x08]
        mov      gword ptr [rbp-0x40], r15
        mov      gword ptr [rbp-0x38], r14
        test     rdi, rdi
        jne      SHORT G_M59943_IG04
-						;; size=33 bbWeight=1 PerfScore 12.75
+						;; size=31 bbWeight=1 PerfScore 9.75
 G_M59943_IG03:
        lea      rdi, [rbp-0x40]
        mov      rax, 0xD1FFAB1E      ; code for System.Reflection.TypeLoading.RoConstructedGenericType+Key:GetHashCode():int:this
        call     [rax]System.Reflection.TypeLoading.RoConstructedGenericType+Key:GetHashCode():int:this
        mov      r12d, eax
        jmp      SHORT G_M59943_IG05
 						;; size=21 bbWeight=0.50 PerfScore 3.00
 G_M59943_IG04:
        mov      rsi, gword ptr [rbp-0x40]
        mov      rdx, gword ptr [rbp-0x38]
        mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[System.Reflection.TypeLoading.RoConstructedGenericType+Key]:GetHashCode(System.Reflection.TypeLoading.RoConstructedGenericType+Key):int:this
        call     [r11]System.Collections.Generic.IEqualityComparer`1[System.Reflection.TypeLoading.RoConstructedGenericType+Key]:GetHashCode(System.Reflection.TypeLoading.RoConstructedGenericType+Key):int:this
        mov      r12d, eax
 						;; size=24 bbWeight=0.50 PerfScore 2.75
 G_M59943_IG05:
        mov      rdx, r15
        mov      rcx, r14
        lea      r9, [rbp-0x30]
        mov      rsi, r13
        mov      r8d, r12d
        mov      rdi, 0xD1FFAB1E      ; System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Reflection.TypeLoading.RoConstructedGenericType]
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:TryGetValueInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon],System.Reflection.TypeLoading.RoConstructedGenericType+Key,int,byref):ubyte
        call     [rax]System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:TryGetValueInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon],System.Reflection.TypeLoading.RoConstructedGenericType+Key,int,byref):ubyte
        test     eax, eax
        jne      SHORT G_M59943_IG07
 						;; size=42 bbWeight=1 PerfScore 6.25
 G_M59943_IG06:
        mov      byte  ptr [rbp-0x48], 1
        mov      dword ptr [rbp-0x44], r12d
        mov      rsi, r15
        mov      rdx, r14
        mov      rdi, 0xD1FFAB1E      ; const ptr
        mov      rax, gword ptr [rdi]
        mov      rdi, gword ptr [rax+0x08]
        call     [rax+0x18]System.Func`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:Invoke(System.Reflection.TypeLoading.RoConstructedGenericType+Key):System.__Canon:this
        mov      r9, rax
        xor      r8d, r8d
        mov      dword ptr [rsp], r8d
        mov      dword ptr [rsp+0x08], 1
        lea      r8, [rbp-0x30]
        mov      qword ptr [rsp+0x10], r8
        mov      r8, qword ptr [rbp-0x48]
        mov      rdx, r15
        mov      rcx, r14
        mov      rsi, r13
        mov      rdi, rbx
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:TryAddInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon],System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Nullable`1[int],System.__Canon,ubyte,ubyte,byref):ubyte:this
        call     [rax]System.Collections.Concurrent.ConcurrentDictionary`2[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon]:TryAddInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.__Canon],System.Reflection.TypeLoading.RoConstructedGenericType+Key,System.Nullable`1[int],System.__Canon,ubyte,ubyte,byref):ubyte:this
 						;; size=89 bbWeight=0.50 PerfScore 9.50
 G_M59943_IG07:
        mov      rax, gword ptr [rbp-0x30]
 						;; size=4 bbWeight=1 PerfScore 1.00
 G_M59943_IG08:
        add      rsp, 56
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=1 PerfScore 4.25
 
-; Total bytes of code 263, prolog size 35, PerfScore 49.83, instruction count 72, allocated bytes for code 263 (MethodHash=966015d8) for method System.Reflection.TypeLoading.RoModule:GetUniqueConstructedGenericType(System.Reflection.TypeLoading.RoDefinitionType,System.Reflection.TypeLoading.RoType[]):System.Reflection.TypeLoading.RoConstructedGenericType:this (FullOpts)
+; Total bytes of code 261, prolog size 35, PerfScore 46.83, instruction count 71, allocated bytes for code 261 (MethodHash=966015d8) for method System.Reflection.TypeLoading.RoModule:GetUniqueConstructedGenericType(System.Reflection.TypeLoading.RoDefinitionType,System.Reflection.TypeLoading.RoType[]):System.Reflection.TypeLoading.RoConstructedGenericType:this (FullOpts)
 ; ============================================================

Note: some changes were skipped as they were too large to fit into a comment.

Larger list of diffs: https://gist.github.com/MihuBot/94bddedd38ee47d660401f047f2d83e1

@MihuBot
Copy link
Owner Author

MihuBot commented Nov 21, 2024

@MichalPetryka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant