MihuBot / runtime-utils

0 stars 0 forks source link

[X64] [teo-tsirpanis] Optimize the managed hash implementations. #203

Open MihuBot opened 1 year ago

MihuBot commented 1 year ago

Build completed in 2 hours 14 minutes.

CoreLib diffs

Found 2 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 7231411
Total bytes of diff: 7230658
Total bytes of delta: -753 (-0.01 % of base)
Total relative delta: -0.72
    diff is an improvement.
    relative diff is an improvement.

Total byte diff includes -79 bytes from reconciling methods
    Base had    1 unique methods,      165 unique bytes
    Diff had    1 unique methods,       86 unique bytes

Top file improvements (bytes):
        -753 : System.Private.CoreLib.dasm (-0.01 % of base)

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

Top method regressions (bytes):
          86 (Infinity of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:.ctor():this (FullOpts) (0 base, 1 diff methods)
           9 (7.44 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Append(System.ReadOnlySpan`1[ubyte]):this (FullOpts)
           6 (7.79 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Append(ubyte):this (FullOpts)

Top method improvements (bytes):
        -447 (-46.42 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this (FullOpts)
        -165 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Start():this (FullOpts) (1 base, 0 diff methods)
        -150 (-26.50 % of base) : System.Private.CoreLib.dasm - System.Diagnostics.Tracing.EventSource:GenerateGuidFromName(System.String):System.Guid (FullOpts)
         -79 (-11.58 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Drain():this (FullOpts)
         -13 (-2.75 % of base) : System.Private.CoreLib.dasm - System.Reflection.AssemblyNameHelpers:ComputePublicKeyToken(ubyte[]):ubyte[] (FullOpts)

Top method regressions (percentages):
          86 (Infinity of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:.ctor():this (FullOpts) (0 base, 1 diff methods)
           6 (7.79 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Append(ubyte):this (FullOpts)
           9 (7.44 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Append(System.ReadOnlySpan`1[ubyte]):this (FullOpts)

Top method improvements (percentages):
        -165 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Start():this (FullOpts) (1 base, 0 diff methods)
        -447 (-46.42 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this (FullOpts)
        -150 (-26.50 % of base) : System.Private.CoreLib.dasm - System.Diagnostics.Tracing.EventSource:GenerateGuidFromName(System.String):System.Guid (FullOpts)
         -79 (-11.58 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Drain():this (FullOpts)
         -13 (-2.75 % of base) : System.Private.CoreLib.dasm - System.Reflection.AssemblyNameHelpers:ComputePublicKeyToken(ubyte[]):ubyte[] (FullOpts)

8 total methods with Code Size differences (5 improved, 3 regressed), 55240 unchanged.

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

Frameworks diffs

Diffs ``` Found 352 files with textual diffs. Summary of Code Size diffs: (Lower is better) Total bytes of base: 38518554 Total bytes of diff: 38517801 Total bytes of delta: -753 (-0.00 % of base) Total relative delta: -0.72 diff is an improvement. relative diff is an improvement. Total byte diff includes -79 bytes from reconciling methods Base had 1 unique methods, 165 unique bytes Diff had 1 unique methods, 86 unique bytes Top file improvements (bytes): -753 : System.Private.CoreLib.dasm (-0.01 % of base) 1 total files with Code Size differences (1 improved, 0 regressed), 255 unchanged. Top method regressions (bytes): 86 (Infinity of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:.ctor():this (FullOpts) (0 base, 1 diff methods) 9 (7.44 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Append(System.ReadOnlySpan`1[ubyte]):this (FullOpts) 6 (7.79 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Append(ubyte):this (FullOpts) Top method improvements (bytes): -447 (-46.42 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this (FullOpts) -165 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Start():this (FullOpts) (1 base, 0 diff methods) -150 (-26.50 % of base) : System.Private.CoreLib.dasm - System.Diagnostics.Tracing.EventSource:GenerateGuidFromName(System.String):System.Guid (FullOpts) -79 (-11.58 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Drain():this (FullOpts) -13 (-2.75 % of base) : System.Private.CoreLib.dasm - System.Reflection.AssemblyNameHelpers:ComputePublicKeyToken(ubyte[]):ubyte[] (FullOpts) Top method regressions (percentages): 86 (Infinity of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:.ctor():this (FullOpts) (0 base, 1 diff methods) 6 (7.79 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Append(ubyte):this (FullOpts) 9 (7.44 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Append(System.ReadOnlySpan`1[ubyte]):this (FullOpts) Top method improvements (percentages): -165 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Start():this (FullOpts) (1 base, 0 diff methods) -447 (-46.42 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this (FullOpts) -150 (-26.50 % of base) : System.Private.CoreLib.dasm - System.Diagnostics.Tracing.EventSource:GenerateGuidFromName(System.String):System.Guid (FullOpts) -79 (-11.58 % of base) : System.Private.CoreLib.dasm - System.Sha1ForNonSecretPurposes:Drain():this (FullOpts) -13 (-2.75 % of base) : System.Private.CoreLib.dasm - System.Reflection.AssemblyNameHelpers:ComputePublicKeyToken(ubyte[]):ubyte[] (FullOpts) 8 total methods with Code Size differences (5 improved, 3 regressed), 234986 unchanged. -------------------------------------------------------------------------------- ```

Artifacts:

MihuBot commented 1 year ago

Top method regressions

86 (Infinity of base) - System.Sha1ForNonSecretPurposes:.ctor():this ```diff +; Assembly listing for method System.Sha1ForNonSecretPurposes:.ctor():this (FullOpts) +; Emitting BLENDED_CODE for X64 with AVX512 - Unix +; FullOpts code +; optimized code +; rbp based frame +; partially interruptible +; No PGO data +; 0 inlinees with PGO data; 5 single block inlinees; 0 inlinees without PGO data +; Final local variable assignments +; +; V00 this [V00,T00] ( 8, 8 ) byref -> rbx this single-def +;# V01 OutArgs [V01 ] ( 1, 1 ) struct ( 0) [rsp+0x00] do-not-enreg[XS] addr-exposed "OutgoingArgSpace" +;* V02 tmp1 [V02 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V03 tmp2 [V03 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V04 tmp3 [V04 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V05 tmp4 [V05 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V06 tmp5 [V06 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +; +; Lcl frame size = 0 + +G_M32278_IG01: + push rbp + push rbx + lea rbp, [rsp+0x08] + mov rbx, rdi + ;; size=10 bbWeight=1 PerfScore 2.75 +G_M32278_IG02: + xor edx, edx + mov qword ptr [rbx], rdx + lea rdi, bword ptr [rbx+0x08] + xor esi, esi + mov edx, 340 + call CORINFO_HELP_MEMSET + xor eax, eax + mov dword ptr [rbx+0x15C], eax + mov rax, 0xD1FFAB1E + mov qword ptr [rbx+0x148], rax + mov rax, 0xD1FFAB1E + mov qword ptr [rbx+0x150], rax + mov dword ptr [rbx+0x158], 0xD1FFAB1E + ;; size=73 bbWeight=1 PerfScore 8.00 +G_M32278_IG03: + pop rbx + pop rbp + ret + ;; size=3 bbWeight=1 PerfScore 2.00 + +; Total bytes of code 86, prolog size 7, PerfScore 21.35, instruction count 20, allocated bytes for code 86 (MethodHash=c3e181e9) for method System.Sha1ForNonSecretPurposes:.ctor():this (FullOpts) +; ============================================================ ```
9 (7.44 % of base) - System.Sha1ForNonSecretPurposes:Append(System.ReadOnlySpan`1[ubyte]):this ```diff ; Assembly listing for method System.Sha1ForNonSecretPurposes:Append(System.ReadOnlySpan`1[ubyte]):this (FullOpts) ; Emitting BLENDED_CODE for X64 with AVX512 - Unix ; FullOpts code ; optimized code ; rbp based frame ; fully interruptible ; No PGO data -; 0 inlinees with PGO data; 0 single block inlinees; 1 inlinees without PGO data +; 0 inlinees with PGO data; 6 single block inlinees; 1 inlinees without PGO data ; Final local variable assignments ; -; V00 this [V00,T01] ( 7, 20 ) byref -> rbx this single-def +; V00 this [V00,T00] ( 7, 20 ) byref -> rbx this single-def ;* V01 arg1 [V01 ] ( 0, 0 ) struct (16) zero-ref multireg-arg single-def ;* V02 loc0 [V02 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op -; V03 loc1 [V03,T02] ( 5, 17 ) int -> r13 +; V03 loc1 [V03,T01] ( 5, 17 ) int -> r13 ; V04 loc2 [V04,T09] ( 2, 8 ) ubyte -> rdi ;# V05 OutArgs [V05 ] ( 1, 1 ) struct ( 0) [rsp+0x00] do-not-enreg[XS] addr-exposed "OutgoingArgSpace" -; V06 tmp1 [V06,T06] ( 3, 12 ) int -> rax "Inline stloc first use temp" -; V07 tmp2 [V07,T03] ( 2, 16 ) ref -> rdx class-hnd "Strict ordering of exceptions for Array store" -; V08 tmp3 [V08,T04] ( 2, 16 ) int -> rdi "Strict ordering of exceptions for Array store" -; V09 tmp4 [V09,T07] ( 3, 12 ) int -> rdi "Inline stloc first use temp" -; V10 tmp5 [V10,T13] ( 2, 2 ) byref -> rsi single-def "field V01._reference (fldOffset=0x0)" P-INDEP -; V11 tmp6 [V11,T14] ( 2, 2 ) int -> rdx single-def "field V01._length (fldOffset=0x8)" P-INDEP -; V12 tmp7 [V12,T12] ( 2, 5 ) byref -> r15 single-def "field V02._reference (fldOffset=0x0)" P-INDEP -; V13 tmp8 [V13,T11] ( 3, 6 ) int -> r14 "field V02._length (fldOffset=0x8)" P-INDEP -; V14 tmp9 [V14,T00] ( 3, 24 ) ref -> rcx "arr expr" -; V15 cse0 [V15,T05] ( 3, 12 ) ref -> rcx "CSE - aggressive" -; V16 cse1 [V16,T10] ( 2, 8 ) int -> rsi "CSE - aggressive" -; V17 cse2 [V17,T08] ( 3, 12 ) long -> rax "CSE - aggressive" +; V06 tmp1 [V06,T04] ( 3, 12 ) int -> rax "Inline stloc first use temp" +;* V07 tmp2 [V07 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inline stloc first use temp" +; V08 tmp3 [V08,T02] ( 2, 16 ) byref -> rdx "impAppendStmt" +; V09 tmp4 [V09,T05] ( 3, 12 ) int -> rdi "Inline stloc first use temp" +;* V10 tmp5 [V10 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V11 tmp6 [V11 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V12 tmp7 [V12 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V13 tmp8 [V13 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +; V14 tmp9 [V14,T12] ( 2, 2 ) byref -> rsi single-def "field V01._reference (fldOffset=0x0)" P-INDEP +; V15 tmp10 [V15,T13] ( 2, 2 ) int -> rdx single-def "field V01._length (fldOffset=0x8)" P-INDEP +; V16 tmp11 [V16,T11] ( 2, 5 ) byref -> r15 single-def "field V02._reference (fldOffset=0x0)" P-INDEP +; V17 tmp12 [V17,T10] ( 3, 6 ) int -> r14 "field V02._length (fldOffset=0x8)" P-INDEP +;* V18 tmp13 [V18 ] ( 0, 0 ) byref -> zero-ref "field V07._reference (fldOffset=0x0)" P-INDEP +;* V19 tmp14 [V19 ] ( 0, 0 ) int -> zero-ref "field V07._length (fldOffset=0x8)" P-INDEP +; V20 tmp15 [V20,T07] ( 2, 8 ) byref -> rdx "field V11._reference (fldOffset=0x0)" P-INDEP +;* V21 tmp16 [V21 ] ( 0, 0 ) int -> zero-ref "field V11._length (fldOffset=0x8)" P-INDEP +; V22 tmp17 [V22,T08] ( 2, 8 ) byref -> rcx "field V13._reference (fldOffset=0x0)" P-INDEP +;* V23 tmp18 [V23 ] ( 0, 0 ) int -> zero-ref "field V13._length (fldOffset=0x8)" P-INDEP +; V24 cse0 [V24,T03] ( 3, 12 ) byref -> rcx "CSE - aggressive" +; V25 cse1 [V25,T06] ( 3, 12 ) long -> rax "CSE - aggressive" ; ; Lcl frame size = 0 G_M32469_IG01: push rbp push r15 push r14 push r13 push rbx lea rbp, [rsp+0x20] mov rbx, rdi ;; size=16 bbWeight=1 PerfScore 5.75 G_M32469_IG02: mov r15, rsi mov r14d, edx xor r13d, r13d test r14d, r14d jle SHORT G_M32469_IG06 ;; size=14 bbWeight=1 PerfScore 2.00 G_M32469_IG03: mov edi, r13d movzx rdi, byte ptr [r15+rdi] - mov eax, dword ptr [rbx+0x10] + mov eax, dword ptr [rbx+0x15C] sar eax, 2 - mov rcx, gword ptr [rbx] + lea rcx, bword ptr [rbx+0x08] mov rdx, rcx - mov esi, dword ptr [rcx+0x08] - cmp eax, esi + cmp eax, 85 jae SHORT G_M32469_IG07 - mov ecx, dword ptr [rcx+4*rax+0x10] - shl ecx, 8 - or edi, ecx - mov dword ptr [rdx+4*rax+0x10], edi - mov edi, dword ptr [rbx+0x10] + lea rdx, bword ptr [rdx+4*rax] + mov eax, dword ptr [rcx+4*rax] + shl eax, 8 + or edi, eax + mov dword ptr [rdx], edi + mov edi, dword ptr [rbx+0x15C] inc edi - mov dword ptr [rbx+0x10], edi + mov dword ptr [rbx+0x15C], edi cmp edi, 64 jne SHORT G_M32469_IG05 - ;; size=53 bbWeight=4 PerfScore 74.00 + ;; size=62 bbWeight=4 PerfScore 62.00 G_M32469_IG04: mov rdi, rbx mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this call [rax]System.Sha1ForNonSecretPurposes:Drain():this ;; size=15 bbWeight=2 PerfScore 7.00 G_M32469_IG05: inc r13d cmp r13d, r14d jl SHORT G_M32469_IG03 ;; size=8 bbWeight=4 PerfScore 6.00 G_M32469_IG06: pop rbx pop r13 pop r14 pop r15 pop rbp ret ;; size=9 bbWeight=1 PerfScore 3.50 G_M32469_IG07: call CORINFO_HELP_RNGCHKFAIL int3 ;; size=6 bbWeight=0 PerfScore 0.00 -; Total bytes of code 121, prolog size 16, PerfScore 110.35, instruction count 44, allocated bytes for code 121 (MethodHash=bf49812a) for method System.Sha1ForNonSecretPurposes:Append(System.ReadOnlySpan`1[ubyte]):this (FullOpts) +; Total bytes of code 130, prolog size 16, PerfScore 99.25, instruction count 44, allocated bytes for code 130 (MethodHash=bf49812a) for method System.Sha1ForNonSecretPurposes:Append(System.ReadOnlySpan`1[ubyte]):this (FullOpts) ```
6 (7.79 % of base) - System.Sha1ForNonSecretPurposes:Append(ubyte):this ```diff ; Assembly listing for method System.Sha1ForNonSecretPurposes:Append(ubyte):this (FullOpts) ; Emitting BLENDED_CODE for X64 with AVX512 - Unix ; FullOpts code ; optimized code ; rbp based frame -; fully interruptible +; partially interruptible ; No PGO data +; 0 inlinees with PGO data; 6 single block inlinees; 0 inlinees without PGO data ; Final local variable assignments ; ; V00 this [V00,T00] ( 7, 6.50) byref -> rdi this single-def -; V01 arg1 [V01,T02] ( 3, 3 ) ubyte -> rsi single-def -; V02 loc0 [V02,T06] ( 3, 3 ) int -> rax -; V03 loc1 [V03,T07] ( 3, 3 ) int -> rax -;# V04 OutArgs [V04 ] ( 1, 1 ) struct ( 0) [rsp+0x00] do-not-enreg[XS] addr-exposed "OutgoingArgSpace" -; V05 tmp1 [V05,T03] ( 2, 4 ) ref -> rdx class-hnd single-def "Strict ordering of exceptions for Array store" -; V06 tmp2 [V06,T04] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V07 tmp3 [V07,T01] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V08 cse0 [V08,T05] ( 3, 3 ) ref -> rcx "CSE - aggressive" -; V09 cse1 [V09,T09] ( 2, 2 ) int -> r8 "CSE - aggressive" -; V10 cse2 [V10,T08] ( 3, 3 ) long -> rax "CSE - aggressive" +; V01 arg1 [V01,T01] ( 3, 3 ) ubyte -> rsi single-def +; V02 loc0 [V02,T04] ( 3, 3 ) int -> rax +;* V03 loc1 [V03 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op +; V04 loc2 [V04,T05] ( 3, 3 ) int -> rax +;# V05 OutArgs [V05 ] ( 1, 1 ) struct ( 0) [rsp+0x00] do-not-enreg[XS] addr-exposed "OutgoingArgSpace" +; V06 tmp1 [V06,T02] ( 2, 4 ) byref -> rdx single-def "impAppendStmt" +;* V07 tmp2 [V07 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V08 tmp3 [V08 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V09 tmp4 [V09 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V10 tmp5 [V10 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V11 tmp6 [V11 ] ( 0, 0 ) byref -> zero-ref "field V03._reference (fldOffset=0x0)" P-INDEP +;* V12 tmp7 [V12 ] ( 0, 0 ) int -> zero-ref "field V03._length (fldOffset=0x8)" P-INDEP +; V13 tmp8 [V13,T07] ( 2, 2 ) byref -> rdx single-def "field V08._reference (fldOffset=0x0)" P-INDEP +;* V14 tmp9 [V14 ] ( 0, 0 ) int -> zero-ref "field V08._length (fldOffset=0x8)" P-INDEP +; V15 tmp10 [V15,T08] ( 2, 2 ) byref -> rcx single-def "field V10._reference (fldOffset=0x0)" P-INDEP +;* V16 tmp11 [V16 ] ( 0, 0 ) int -> zero-ref "field V10._length (fldOffset=0x8)" P-INDEP +; V17 cse0 [V17,T03] ( 3, 3 ) byref -> rcx "CSE - aggressive" +; V18 cse1 [V18,T06] ( 3, 3 ) long -> rax "CSE - aggressive" ; ; Lcl frame size = 0 G_M11779_IG01: push rbp mov rbp, rsp ;; size=4 bbWeight=1 PerfScore 1.25 G_M11779_IG02: - mov eax, dword ptr [rdi+0x10] + mov eax, dword ptr [rdi+0x15C] sar eax, 2 - mov rcx, gword ptr [rdi] + lea rcx, bword ptr [rdi+0x08] mov rdx, rcx - mov r8d, dword ptr [rcx+0x08] - cmp eax, r8d + cmp eax, 85 jae SHORT G_M11779_IG06 - mov ecx, dword ptr [rcx+4*rax+0x10] - shl ecx, 8 - movzx rsi, sil - or ecx, esi - mov dword ptr [rdx+4*rax+0x10], ecx - mov eax, dword ptr [rdi+0x10] + lea rdx, bword ptr [rdx+4*rax] + mov eax, dword ptr [rcx+4*rax] + shl eax, 8 + movzx rcx, sil + or eax, ecx + mov dword ptr [rdx], eax + mov eax, dword ptr [rdi+0x15C] inc eax - mov dword ptr [rdi+0x10], eax + mov dword ptr [rdi+0x15C], eax cmp eax, 64 - jne SHORT G_M11779_IG05 - ;; size=51 bbWeight=1 PerfScore 16.50 + jne SHORT G_M11779_IG04 + ;; size=58 bbWeight=1 PerfScore 13.50 G_M11779_IG03: mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this - ;; size=10 bbWeight=0.50 PerfScore 0.12 + call [rax]System.Sha1ForNonSecretPurposes:Drain():this + ;; size=12 bbWeight=0.50 PerfScore 1.62 G_M11779_IG04: - pop rbp - tail.jmp [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=4 bbWeight=0.50 PerfScore 1.25 + nop + ;; size=1 bbWeight=1 PerfScore 0.25 G_M11779_IG05: pop rbp ret - ;; size=2 bbWeight=0.50 PerfScore 0.75 + ;; size=2 bbWeight=1 PerfScore 1.50 G_M11779_IG06: call CORINFO_HELP_RNGCHKFAIL int3 ;; size=6 bbWeight=0 PerfScore 0.00 -; Total bytes of code 77, prolog size 4, PerfScore 27.58, instruction count 26, allocated bytes for code 77 (MethodHash=0b1ed1fc) for method System.Sha1ForNonSecretPurposes:Append(ubyte):this (FullOpts) +; Total bytes of code 83, prolog size 4, PerfScore 26.43, instruction count 26, allocated bytes for code 83 (MethodHash=0b1ed1fc) for method System.Sha1ForNonSecretPurposes:Append(ubyte):this (FullOpts) ```
MihuBot commented 1 year ago

Top method improvements

-447 (-46.42 % of base) - System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this ```diff ; Assembly listing for method System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this (FullOpts) ; Emitting BLENDED_CODE for X64 with AVX512 - Unix ; FullOpts code ; optimized code ; rbp based frame ; fully interruptible ; No PGO data -; 0 inlinees with PGO data; 0 single block inlinees; 10 inlinees without PGO data +; 0 inlinees with PGO data; 18 single block inlinees; 2 inlinees without PGO data ; Final local variable assignments ; -; V00 this [V00,T00] ( 66, 83.50) byref -> rbx this single-def +; V00 this [V00,T00] ( 22, 34.50) byref -> rbx this single-def ;* V01 arg1 [V01 ] ( 0, 0 ) struct (16) zero-ref multireg-arg ld-addr-op single-def -; V02 loc0 [V02,T14] ( 9, 9 ) long -> r13 -; V03 loc1 [V03,T36] ( 3, 6 ) int -> rax +; V02 loc0 [V02,T10] ( 9, 9 ) long -> r13 +; V03 loc1 [V03,T17] ( 3, 6 ) int -> rax ; V04 loc2 [V04,T01] ( 8, 29 ) int -> rcx -; V05 loc3 [V05,T11] ( 3, 12 ) int -> rdx -;# V06 OutArgs [V06 ] ( 1, 1 ) struct ( 0) [rsp+0x00] do-not-enreg[XS] addr-exposed "OutgoingArgSpace" -; V07 tmp1 [V07,T65] ( 2, 2 ) int -> rax -; V08 tmp2 [V08,T37] ( 5, 5 ) int -> rdi "Inline stloc first use temp" -; V09 tmp3 [V09,T18] ( 3, 6 ) ref -> rax class-hnd single-def "Strict ordering of exceptions for Array store" -; V10 tmp4 [V10,T46] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V11 tmp5 [V11,T55] ( 3, 3 ) int -> rdi "Inline stloc first use temp" -; V12 tmp6 [V12,T07] ( 4, 16 ) int -> rdi "Inline stloc first use temp" -; V13 tmp7 [V13,T08] ( 2, 16 ) ref -> rcx class-hnd "Strict ordering of exceptions for Array store" -; V14 tmp8 [V14,T09] ( 2, 16 ) int -> rax "Strict ordering of exceptions for Array store" -; V15 tmp9 [V15,T12] ( 3, 12 ) int -> rdi "Inline stloc first use temp" -; V16 tmp10 [V16,T38] ( 5, 5 ) int -> rdi "Inline stloc first use temp" -;* V17 tmp11 [V17 ] ( 0, 0 ) ubyte -> zero-ref "Inlining Arg" -; V18 tmp12 [V18,T19] ( 3, 6 ) ref -> rax class-hnd single-def "Strict ordering of exceptions for Array store" -; V19 tmp13 [V19,T47] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V20 tmp14 [V20,T56] ( 3, 3 ) int -> rdi "Inline stloc first use temp" -; V21 tmp15 [V21,T39] ( 5, 5 ) int -> rdi "Inline stloc first use temp" -;* V22 tmp16 [V22 ] ( 0, 0 ) ubyte -> zero-ref "Inlining Arg" -; V23 tmp17 [V23,T20] ( 3, 6 ) ref -> rax class-hnd single-def "Strict ordering of exceptions for Array store" -; V24 tmp18 [V24,T48] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V25 tmp19 [V25,T57] ( 3, 3 ) int -> rdi "Inline stloc first use temp" -; V26 tmp20 [V26,T40] ( 5, 5 ) int -> rdi "Inline stloc first use temp" -;* V27 tmp21 [V27 ] ( 0, 0 ) ubyte -> zero-ref "Inlining Arg" -; V28 tmp22 [V28,T21] ( 3, 6 ) ref -> rax class-hnd single-def "Strict ordering of exceptions for Array store" -; V29 tmp23 [V29,T49] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V30 tmp24 [V30,T58] ( 3, 3 ) int -> rdi "Inline stloc first use temp" -; V31 tmp25 [V31,T41] ( 5, 5 ) int -> rdi "Inline stloc first use temp" -;* V32 tmp26 [V32 ] ( 0, 0 ) ubyte -> zero-ref "Inlining Arg" -; V33 tmp27 [V33,T22] ( 3, 6 ) ref -> rax class-hnd single-def "Strict ordering of exceptions for Array store" -; V34 tmp28 [V34,T50] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V35 tmp29 [V35,T59] ( 3, 3 ) int -> rdi "Inline stloc first use temp" -; V36 tmp30 [V36,T42] ( 5, 5 ) int -> rdi "Inline stloc first use temp" -;* V37 tmp31 [V37 ] ( 0, 0 ) ubyte -> zero-ref "Inlining Arg" -; V38 tmp32 [V38,T23] ( 3, 6 ) ref -> rax class-hnd single-def "Strict ordering of exceptions for Array store" -; V39 tmp33 [V39,T51] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V40 tmp34 [V40,T60] ( 3, 3 ) int -> rdi "Inline stloc first use temp" -; V41 tmp35 [V41,T43] ( 5, 5 ) int -> rdi "Inline stloc first use temp" -;* V42 tmp36 [V42 ] ( 0, 0 ) ubyte -> zero-ref "Inlining Arg" -; V43 tmp37 [V43,T24] ( 3, 6 ) ref -> rax class-hnd single-def "Strict ordering of exceptions for Array store" -; V44 tmp38 [V44,T52] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V45 tmp39 [V45,T61] ( 3, 3 ) int -> rdi "Inline stloc first use temp" -; V46 tmp40 [V46,T44] ( 5, 5 ) int -> rdi "Inline stloc first use temp" -;* V47 tmp41 [V47 ] ( 0, 0 ) ubyte -> zero-ref "Inlining Arg" -; V48 tmp42 [V48,T25] ( 3, 6 ) ref -> rax class-hnd single-def "Strict ordering of exceptions for Array store" -; V49 tmp43 [V49,T53] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V50 tmp44 [V50,T62] ( 3, 3 ) int -> rdi "Inline stloc first use temp" -; V51 tmp45 [V51,T45] ( 5, 5 ) int -> rdi "Inline stloc first use temp" -;* V52 tmp46 [V52 ] ( 0, 0 ) ubyte -> zero-ref "Inlining Arg" -; V53 tmp47 [V53,T26] ( 3, 6 ) ref -> rax class-hnd single-def "Strict ordering of exceptions for Array store" -; V54 tmp48 [V54,T54] ( 2, 4 ) int -> rcx "Strict ordering of exceptions for Array store" -; V55 tmp49 [V55,T63] ( 3, 3 ) int -> rdi "Inline stloc first use temp" -; V56 tmp50 [V56,T17] ( 2, 5 ) byref -> r14 single-def "field V01._reference (fldOffset=0x0)" P-INDEP -; V57 tmp51 [V57,T15] ( 4, 7 ) int -> r15 single-def "field V01._length (fldOffset=0x8)" P-INDEP -; V58 tmp52 [V58,T27] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V59 tmp53 [V59,T02] ( 3, 24 ) ref -> rax "arr expr" -; V60 tmp54 [V60,T28] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V61 tmp55 [V61,T29] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V62 tmp56 [V62,T30] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V63 tmp57 [V63,T31] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V64 tmp58 [V64,T32] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V65 tmp59 [V65,T33] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V66 tmp60 [V66,T34] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V67 tmp61 [V67,T35] ( 3, 6 ) ref -> rcx single-def "arr expr" -; V68 tmp62 [V68,T03] ( 3, 24 ) ref -> rdx "arr expr" -; V69 tmp63 [V69,T05] ( 3, 24 ) int -> rsi "index expr" -; V70 tmp64 [V70,T04] ( 3, 24 ) ref -> rsi "arr expr" -; V71 tmp65 [V71,T06] ( 3, 24 ) int -> rdi "index expr" -; V72 cse0 [V72,T13] ( 3, 12 ) int -> rdi "CSE - moderate" -; V73 cse1 [V73,T64] ( 3, 3 ) int -> rdi "CSE - conservative" -; V74 cse2 [V74,T10] ( 3, 12 ) ref -> rax "CSE - moderate" -; V75 cse3 [V75,T16] ( 2, 8 ) int -> rdx "CSE - moderate" +; V05 loc3 [V05,T07] ( 3, 12 ) int -> rdx +;* V06 loc4 [V06 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op +;# V07 OutArgs [V07 ] ( 1, 1 ) struct ( 0) [rsp+0x00] do-not-enreg[XS] addr-exposed "OutgoingArgSpace" +; V08 tmp1 [V08,T24] ( 2, 2 ) int -> rax +; V09 tmp2 [V09,T02] ( 3, 24 ) int -> rsi "Span.get_Item index" +; V10 tmp3 [V10,T06] ( 2, 16 ) int -> rdi "Span.get_Item index" +; V11 tmp4 [V11,T18] ( 4, 4 ) int -> rdi "Inline stloc first use temp" +;* V12 tmp5 [V12 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inline stloc first use temp" +; V13 tmp6 [V13,T19] ( 2, 4 ) byref -> rax single-def "impAppendStmt" +; V14 tmp7 [V14,T20] ( 3, 3 ) int -> rdi "Inline stloc first use temp" +;* V15 tmp8 [V15 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V16 tmp9 [V16 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V17 tmp10 [V17 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V18 tmp11 [V18 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +; V19 tmp12 [V19,T04] ( 4, 16 ) int -> rdi "Inline stloc first use temp" +;* V20 tmp13 [V20 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inline stloc first use temp" +; V21 tmp14 [V21,T05] ( 2, 16 ) byref -> rax "impAppendStmt" +; V22 tmp15 [V22,T08] ( 3, 12 ) int -> rdi "Inline stloc first use temp" +;* V23 tmp16 [V23 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V24 tmp17 [V24 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V25 tmp18 [V25 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V26 tmp19 [V26 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V27 tmp20 [V27 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V28 tmp21 [V28 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V29 tmp22 [V29 ] ( 0, 0 ) byref -> zero-ref "Inlining Arg" +;* V30 tmp23 [V30 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +; V31 tmp24 [V31,T16] ( 2, 5 ) byref -> r14 single-def "field V01._reference (fldOffset=0x0)" P-INDEP +; V32 tmp25 [V32,T11] ( 4, 7 ) int -> r15 single-def "field V01._length (fldOffset=0x8)" P-INDEP +;* V33 tmp26 [V33 ] ( 0, 0 ) byref -> zero-ref "field V06._reference (fldOffset=0x0)" P-INDEP +;* V34 tmp27 [V34 ] ( 0, 0 ) int -> zero-ref "field V06._length (fldOffset=0x8)" P-INDEP +;* V35 tmp28 [V35 ] ( 0, 0 ) byref -> zero-ref "field V12._reference (fldOffset=0x0)" P-INDEP +;* V36 tmp29 [V36 ] ( 0, 0 ) int -> zero-ref "field V12._length (fldOffset=0x8)" P-INDEP +; V37 tmp30 [V37,T22] ( 2, 2 ) byref -> rax single-def "field V16._reference (fldOffset=0x0)" P-INDEP +;* V38 tmp31 [V38 ] ( 0, 0 ) int -> zero-ref "field V16._length (fldOffset=0x8)" P-INDEP +; V39 tmp32 [V39,T23] ( 2, 2 ) byref -> rcx single-def "field V18._reference (fldOffset=0x0)" P-INDEP +;* V40 tmp33 [V40 ] ( 0, 0 ) int -> zero-ref "field V18._length (fldOffset=0x8)" P-INDEP +;* V41 tmp34 [V41 ] ( 0, 0 ) byref -> zero-ref "field V20._reference (fldOffset=0x0)" P-INDEP +;* V42 tmp35 [V42 ] ( 0, 0 ) int -> zero-ref "field V20._length (fldOffset=0x8)" P-INDEP +; V43 tmp36 [V43,T12] ( 2, 8 ) byref -> rax "field V24._reference (fldOffset=0x0)" P-INDEP +;* V44 tmp37 [V44 ] ( 0, 0 ) int -> zero-ref "field V24._length (fldOffset=0x8)" P-INDEP +; V45 tmp38 [V45,T13] ( 2, 8 ) byref -> rcx "field V26._reference (fldOffset=0x0)" P-INDEP +;* V46 tmp39 [V46 ] ( 0, 0 ) int -> zero-ref "field V26._length (fldOffset=0x8)" P-INDEP +; V47 tmp40 [V47,T14] ( 2, 8 ) byref -> rdx "field V28._reference (fldOffset=0x0)" P-INDEP +;* V48 tmp41 [V48 ] ( 0, 0 ) int -> zero-ref "field V28._length (fldOffset=0x8)" P-INDEP +; V49 tmp42 [V49,T15] ( 2, 8 ) byref -> rsi "field V30._reference (fldOffset=0x0)" P-INDEP +;* V50 tmp43 [V50 ] ( 0, 0 ) int -> zero-ref "field V30._length (fldOffset=0x8)" P-INDEP +; V51 cse0 [V51,T09] ( 3, 12 ) int -> rdi "CSE - moderate" +; V52 cse1 [V52,T21] ( 3, 3 ) int -> rdi "CSE - moderate" +; V53 cse2 [V53,T03] ( 7, 19 ) byref -> r12 "CSE - aggressive" ; ; Lcl frame size = 8 G_M15470_IG01: push rbp push r15 push r14 push r13 push r12 push rbx push rax lea rbp, [rsp+0x30] mov rbx, rdi mov r14, rsi mov r15d, edx ;; size=25 bbWeight=1 PerfScore 8.25 G_M15470_IG02: - mov r13, qword ptr [rbx+0x08] - mov edi, dword ptr [rbx+0x10] + mov r13, qword ptr [rbx] + mov edi, dword ptr [rbx+0x15C] lea eax, [8*rdi] movsxd r12, eax add r13, r12 sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, gword ptr [rbx] - cmp edi, dword ptr [rcx+0x08] - jae G_M15470_IG27 - mov edx, edi - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - or ecx, 128 - cmp edi, dword ptr [rax+0x08] - jae G_M15470_IG27 - mov dword ptr [rax+4*rdi+0x10], ecx - mov edi, dword ptr [rbx+0x10] + lea r12, bword ptr [rbx+0x08] + mov rax, r12 + cmp edi, 85 + jae G_M15470_IG12 + mov ecx, edi + lea rax, bword ptr [rax+4*rcx] + mov rcx, r12 + mov edi, dword ptr [rcx+4*rdi] + shl edi, 8 + or edi, 128 + mov dword ptr [rax], edi + mov edi, dword ptr [rbx+0x15C] inc edi - mov dword ptr [rbx+0x10], edi + mov dword ptr [rbx+0x15C], edi cmp edi, 64 jne SHORT G_M15470_IG04 - ;; size=79 bbWeight=1 PerfScore 26.00 + ;; size=83 bbWeight=1 PerfScore 16.75 G_M15470_IG03: mov rdi, rbx mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this call [rax]System.Sha1ForNonSecretPurposes:Drain():this ;; size=15 bbWeight=0.50 PerfScore 1.75 G_M15470_IG04: - cmp dword ptr [rbx+0x10], 56 + cmp dword ptr [rbx+0x15C], 56 je SHORT G_M15470_IG08 - ;; size=6 bbWeight=1 PerfScore 4.00 + ;; size=9 bbWeight=1 PerfScore 4.00 G_M15470_IG05: - mov edi, dword ptr [rbx+0x10] + mov edi, dword ptr [rbx+0x15C] sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, rax - mov edx, dword ptr [rax+0x08] - cmp edi, edx - jae G_M15470_IG27 - mov edx, edi - mov eax, dword ptr [rax+4*rdx+0x10] - shl eax, 8 - mov dword ptr [rcx+4*rdi+0x10], eax - mov edi, dword ptr [rbx+0x10] + mov rax, r12 + cmp edi, 85 + jae G_M15470_IG12 + mov ecx, edi + lea rax, bword ptr [rax+4*rcx] + mov rcx, r12 + mov edi, dword ptr [rcx+4*rdi] + shl edi, 8 + mov dword ptr [rax], edi + mov edi, dword ptr [rbx+0x15C] inc edi - mov dword ptr [rbx+0x10], edi + mov dword ptr [rbx+0x15C], edi cmp edi, 64 jne SHORT G_M15470_IG07 - ;; size=49 bbWeight=4 PerfScore 65.00 + ;; size=57 bbWeight=4 PerfScore 52.00 G_M15470_IG06: mov rdi, rbx mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this call [rax]System.Sha1ForNonSecretPurposes:Drain():this ;; size=15 bbWeight=2 PerfScore 7.00 G_M15470_IG07: - cmp dword ptr [rbx+0x10], 56 + cmp dword ptr [rbx+0x15C], 56 jne SHORT G_M15470_IG05 - ;; size=6 bbWeight=4 PerfScore 16.00 + ;; size=9 bbWeight=4 PerfScore 16.00 G_M15470_IG08: - mov edi, dword ptr [rbx+0x10] - sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, gword ptr [rbx] - cmp edi, dword ptr [rcx+0x08] - jae G_M15470_IG27 - mov edx, edi - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - mov rdx, r13 - sar rdx, 56 - movzx rdx, dl - or ecx, edx - cmp edi, dword ptr [rax+0x08] - jae G_M15470_IG27 - mov dword ptr [rax+4*rdi+0x10], ecx - mov edi, dword ptr [rbx+0x10] - inc edi - mov dword ptr [rbx+0x10], edi - cmp edi, 64 - jne SHORT G_M15470_IG10 - ;; size=68 bbWeight=1 PerfScore 24.00 -G_M15470_IG09: + mov rsi, r13 + sar rsi, 56 + movzx rsi, sil mov rdi, rbx - mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this - call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=15 bbWeight=0.50 PerfScore 1.75 -G_M15470_IG10: - mov edi, dword ptr [rbx+0x10] - sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, gword ptr [rbx] - cmp edi, dword ptr [rcx+0x08] - jae G_M15470_IG27 - mov edx, edi - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - mov rdx, r13 - sar rdx, 48 - movzx rdx, dl - or ecx, edx - cmp edi, dword ptr [rax+0x08] - jae G_M15470_IG27 - mov dword ptr [rax+4*rdi+0x10], ecx - mov edi, dword ptr [rbx+0x10] - inc edi - mov dword ptr [rbx+0x10], edi - cmp edi, 64 - jne SHORT G_M15470_IG12 - ;; size=68 bbWeight=1 PerfScore 24.00 -G_M15470_IG11: + mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Append(ubyte):this + call [rax]System.Sha1ForNonSecretPurposes:Append(ubyte):this + mov rsi, r13 + sar rsi, 48 + movzx rsi, sil mov rdi, rbx - mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this - call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=15 bbWeight=0.50 PerfScore 1.75 -G_M15470_IG12: - mov edi, dword ptr [rbx+0x10] - sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, gword ptr [rbx] - cmp edi, dword ptr [rcx+0x08] - jae G_M15470_IG27 - mov edx, edi - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - mov rdx, r13 - sar rdx, 40 - movzx rdx, dl - or ecx, edx - cmp edi, dword ptr [rax+0x08] - jae G_M15470_IG27 - mov dword ptr [rax+4*rdi+0x10], ecx - mov edi, dword ptr [rbx+0x10] - inc edi - mov dword ptr [rbx+0x10], edi - cmp edi, 64 - jne SHORT G_M15470_IG14 - ;; size=68 bbWeight=1 PerfScore 24.00 -G_M15470_IG13: + mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Append(ubyte):this + call [rax]System.Sha1ForNonSecretPurposes:Append(ubyte):this + mov rsi, r13 + sar rsi, 40 + movzx rsi, sil mov rdi, rbx - mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this - call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=15 bbWeight=0.50 PerfScore 1.75 -G_M15470_IG14: - mov edi, dword ptr [rbx+0x10] - sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, gword ptr [rbx] - cmp edi, dword ptr [rcx+0x08] - jae G_M15470_IG27 - mov edx, edi - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - mov rdx, r13 - sar rdx, 32 - movzx rdx, dl - or ecx, edx - cmp edi, dword ptr [rax+0x08] - jae G_M15470_IG27 - mov dword ptr [rax+4*rdi+0x10], ecx - mov edi, dword ptr [rbx+0x10] - inc edi - mov dword ptr [rbx+0x10], edi - cmp edi, 64 - jne SHORT G_M15470_IG16 - ;; size=68 bbWeight=1 PerfScore 24.00 -G_M15470_IG15: + mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Append(ubyte):this + call [rax]System.Sha1ForNonSecretPurposes:Append(ubyte):this + mov rsi, r13 + sar rsi, 32 + movzx rsi, sil mov rdi, rbx - mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this - call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=15 bbWeight=0.50 PerfScore 1.75 -G_M15470_IG16: - mov edi, dword ptr [rbx+0x10] - sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, gword ptr [rbx] - cmp edi, dword ptr [rcx+0x08] - jae G_M15470_IG27 - mov edx, edi - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - mov rdx, r13 - sar rdx, 24 - movzx rdx, dl - or ecx, edx - cmp edi, dword ptr [rax+0x08] - jae G_M15470_IG27 - mov dword ptr [rax+4*rdi+0x10], ecx - mov edi, dword ptr [rbx+0x10] - inc edi - mov dword ptr [rbx+0x10], edi - cmp edi, 64 - jne SHORT G_M15470_IG18 - ;; size=68 bbWeight=1 PerfScore 24.00 -G_M15470_IG17: + mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Append(ubyte):this + call [rax]System.Sha1ForNonSecretPurposes:Append(ubyte):this + mov rsi, r13 + sar rsi, 24 + movzx rsi, sil mov rdi, rbx - mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this - call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=15 bbWeight=0.50 PerfScore 1.75 -G_M15470_IG18: - mov edi, dword ptr [rbx+0x10] - sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, gword ptr [rbx] - cmp edi, dword ptr [rcx+0x08] - jae G_M15470_IG27 - mov edx, edi - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - mov rdx, r13 - sar rdx, 16 - movzx rdx, dl - or ecx, edx - cmp edi, dword ptr [rax+0x08] - jae G_M15470_IG27 - mov dword ptr [rax+4*rdi+0x10], ecx - mov edi, dword ptr [rbx+0x10] - inc edi - mov dword ptr [rbx+0x10], edi - cmp edi, 64 - jne SHORT G_M15470_IG20 - ;; size=68 bbWeight=1 PerfScore 24.00 -G_M15470_IG19: + mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Append(ubyte):this + call [rax]System.Sha1ForNonSecretPurposes:Append(ubyte):this + mov rsi, r13 + sar rsi, 16 + movzx rsi, sil mov rdi, rbx - mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this - call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=15 bbWeight=0.50 PerfScore 1.75 -G_M15470_IG20: - mov edi, dword ptr [rbx+0x10] - sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, gword ptr [rbx] - cmp edi, dword ptr [rcx+0x08] - jae G_M15470_IG27 - mov edx, edi - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - mov rdx, r13 - sar rdx, 8 - movzx rdx, dl - or ecx, edx - cmp edi, dword ptr [rax+0x08] - jae G_M15470_IG27 - mov dword ptr [rax+4*rdi+0x10], ecx - mov edi, dword ptr [rbx+0x10] - inc edi - mov dword ptr [rbx+0x10], edi - cmp edi, 64 - jne SHORT G_M15470_IG22 - ;; size=68 bbWeight=1 PerfScore 24.00 -G_M15470_IG21: + mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Append(ubyte):this + call [rax]System.Sha1ForNonSecretPurposes:Append(ubyte):this + mov rsi, r13 + sar rsi, 8 + movzx rsi, sil mov rdi, rbx - mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this - call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=15 bbWeight=0.50 PerfScore 1.75 -G_M15470_IG22: - mov edi, dword ptr [rbx+0x10] - sar edi, 2 - mov rax, gword ptr [rbx] - mov rcx, gword ptr [rbx] - cmp edi, dword ptr [rcx+0x08] - jae G_M15470_IG27 - mov edx, edi - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - movzx r13, r13b - or ecx, r13d - cmp edi, dword ptr [rax+0x08] - jae G_M15470_IG27 - mov dword ptr [rax+4*rdi+0x10], ecx - mov edi, dword ptr [rbx+0x10] - inc edi - mov dword ptr [rbx+0x10], edi - cmp edi, 64 - jne SHORT G_M15470_IG24 - ;; size=63 bbWeight=1 PerfScore 23.25 -G_M15470_IG23: + mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Append(ubyte):this + call [rax]System.Sha1ForNonSecretPurposes:Append(ubyte):this + movzx rsi, r13b mov rdi, rbx - mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this - call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=15 bbWeight=0.50 PerfScore 1.75 -G_M15470_IG24: + mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Append(ubyte):this + call [rax]System.Sha1ForNonSecretPurposes:Append(ubyte):this mov eax, 20 cmp r15d, 20 cmovl eax, r15d xor ecx, ecx test eax, eax - je SHORT G_M15470_IG26 - align [0 bytes for IG25] - ;; size=19 bbWeight=1 PerfScore 2.25 -G_M15470_IG25: - mov rdx, gword ptr [rbx] + je SHORT G_M15470_IG11 + ;; size=220 bbWeight=1 PerfScore 37.50 +G_M15470_IG09: + align [0 bytes for IG10] + ;; size=0 bbWeight=1 PerfScore 0.00 +G_M15470_IG10: + mov rdx, r12 mov edi, ecx sar edi, 31 and edi, 3 add edi, ecx sar edi, 2 add edi, 80 mov esi, edi - cmp esi, dword ptr [rdx+0x08] - jae SHORT G_M15470_IG27 - mov edx, dword ptr [rdx+4*rsi+0x10] + cmp esi, 85 + jae SHORT G_M15470_IG12 + mov edx, dword ptr [rdx+4*rsi] cmp ecx, r15d - jae SHORT G_M15470_IG27 + jae SHORT G_M15470_IG12 mov esi, ecx mov r8d, edx shr r8d, 24 mov byte ptr [r14+rsi], r8b - mov rsi, gword ptr [rbx] - cmp edi, dword ptr [rsi+0x08] - jae SHORT G_M15470_IG27 + mov rsi, r12 shl edx, 8 - mov dword ptr [rsi+4*rdi+0x10], edx + mov dword ptr [rsi+4*rdi], edx inc ecx cmp ecx, eax - jne SHORT G_M15470_IG25 - ;; size=69 bbWeight=4 PerfScore 90.00 -G_M15470_IG26: + jne SHORT G_M15470_IG10 + ;; size=62 bbWeight=4 PerfScore 49.00 +G_M15470_IG11: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp ret ;; size=15 bbWeight=1 PerfScore 4.25 -G_M15470_IG27: +G_M15470_IG12: call CORINFO_HELP_RNGCHKFAIL int3 ;; size=6 bbWeight=0 PerfScore 0.00 -; Total bytes of code 963, prolog size 25, PerfScore 526.05, instruction count 291, allocated bytes for code 963 (MethodHash=2d38c391) for method System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this (FullOpts) +; Total bytes of code 516, prolog size 25, PerfScore 248.10, instruction count 145, allocated bytes for code 516 (MethodHash=2d38c391) for method System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this (FullOpts) ```
-150 (-26.50 % of base) - System.Diagnostics.Tracing.EventSource:GenerateGuidFromName(System.String):System.Guid ```diff ; Assembly listing for method System.Diagnostics.Tracing.EventSource:GenerateGuidFromName(System.String):System.Guid (FullOpts) ; Emitting BLENDED_CODE for X64 with AVX512 - Unix ; FullOpts code ; optimized code ; rbp based frame ; fully interruptible ; No PGO data -; 0 inlinees with PGO data; 7 single block inlinees; 15 inlinees without PGO data +; 0 inlinees with PGO data; 20 single block inlinees; 9 inlinees without PGO data ; Final local variable assignments ; -; V00 arg0 [V00,T13] ( 3, 3 ) ref -> rsi class-hnd single-def +; V00 arg0 [V00,T17] ( 3, 3 ) ref -> rdi class-hnd single-def ;* V01 loc0 [V01 ] ( 0, 0 ) struct (16) zero-ref -; V02 loc1 [V02,T08] ( 13, 10.50) ref -> r15 ld-addr-op class-hnd -; V03 loc2 [V03 ] ( 18, 62 ) struct (24) [rbp-0x38] do-not-enreg[XS] must-init addr-exposed ld-addr-op -;# V04 OutArgs [V04 ] ( 1, 1 ) struct ( 0) [rsp+0x00] do-not-enreg[XS] addr-exposed "OutgoingArgSpace" -;* V05 tmp1 [V05 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" -;* V06 tmp2 [V06 ] ( 0, 0 ) struct (16) zero-ref "spilled call-like call argument" -;* V07 tmp3 [V07 ] ( 0, 0 ) struct (16) zero-ref "spilled call-like call argument" -; V08 tmp4 [V08,T18] ( 2, 4 ) int -> rax "Strict ordering of exceptions for Array store" -; V09 tmp5 [V09 ] ( 3, 6 ) struct (16) [rbp-0x48] do-not-enreg[XSR] multireg-ret addr-exposed ld-addr-op "NewObj constructor temp" -;* V10 tmp6 [V10 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inline stloc first use temp" -; V11 tmp7 [V11,T02] ( 5, 17 ) int -> r14 "Inline stloc first use temp" -; V12 tmp8 [V12,T09] ( 2, 8 ) ubyte -> rdi "Inline stloc first use temp" -; V13 tmp9 [V13,T00] ( 5, 20 ) int -> rax "Inline stloc first use temp" -; V14 tmp10 [V14,T04] ( 2, 16 ) int -> rdi "Strict ordering of exceptions for Array store" -; V15 tmp11 [V15,T06] ( 3, 12 ) int -> rdi "Inline stloc first use temp" -; V16 tmp12 [V16,T17] ( 2, 4 ) ref -> rdi class-hnd single-def "Inlining Arg" -;* V17 tmp13 [V17 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" -;* V18 tmp14 [V18 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inline stloc first use temp" -; V19 tmp15 [V19,T03] ( 5, 17 ) int -> r13 "Inline stloc first use temp" -; V20 tmp16 [V20,T10] ( 2, 8 ) ubyte -> rdi "Inline stloc first use temp" -; V21 tmp17 [V21,T01] ( 5, 20 ) int -> rax "Inline stloc first use temp" -; V22 tmp18 [V22,T05] ( 2, 16 ) int -> rdi "Strict ordering of exceptions for Array store" -; V23 tmp19 [V23,T07] ( 3, 12 ) int -> rdi "Inline stloc first use temp" -; V24 tmp20 [V24,T19] ( 4, 3 ) ref -> rbx class-hnd single-def "Inline stloc first use temp" -; V25 tmp21 [V25,T36] ( 3, 1.50) ref -> r15 class-hnd exact single-def "Inline stloc first use temp" -; V26 tmp22 [V26,T25] ( 2, 2 ) byref -> rdi single-def "impAppendStmt" -; V27 tmp23 [V27,T26] ( 2, 2 ) byref -> rsi single-def "impAppendStmt" -; V28 tmp24 [V28,T37] ( 2, 1 ) int -> rax "Inline return value spill temp" -; V29 tmp25 [V29,T20] ( 3, 3 ) int -> rdx "Inlining Arg" -; V30 tmp26 [V30,T33] ( 2, 2 ) long -> rdx "Inlining Arg" -; V31 tmp27 [V31,T11] ( 4, 6 ) ref -> rsi class-hnd single-def "Inlining Arg" -;* V32 tmp28 [V32 ] ( 0, 0 ) struct (16) zero-ref multireg-arg ld-addr-op "NewObj constructor temp" -;* V33 tmp29 [V33 ] ( 0, 0 ) ref -> zero-ref class-hnd single-def "Inlining Arg" -; V34 tmp30 [V34,T27] ( 2, 2 ) byref -> rax single-def -; V35 tmp31 [V35,T28] ( 2, 2 ) ref -> r15 single-def -;* V36 tmp32 [V36 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" -;* V37 tmp33 [V37 ] ( 0, 0 ) ref -> zero-ref class-hnd exact single-def "NewObj constructor temp" -;* V38 tmp34 [V38 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inlining Arg" -;* V39 tmp35 [V39 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inlining Arg" -;* V40 tmp36 [V40 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inlining Arg" -;* V41 tmp37 [V41 ] ( 0, 0 ) byref -> zero-ref single-def "field V01._reference (fldOffset=0x0)" P-INDEP -;* V42 tmp38 [V42 ] ( 0, 0 ) int -> zero-ref "field V01._length (fldOffset=0x8)" P-INDEP -; V43 tmp39 [V43 ] ( 12, 38 ) ref -> [rbp-0x38] do-not-enreg[X] addr-exposed "field V03._w (fldOffset=0x0)" P-DEP -; V44 tmp40 [V44 ] ( 4, 6 ) long -> [rbp-0x30] do-not-enreg[X] addr-exposed "field V03._length (fldOffset=0x8)" P-DEP -; V45 tmp41 [V45 ] ( 10, 30 ) int -> [rbp-0x28] do-not-enreg[X] addr-exposed "field V03._pos (fldOffset=0x10)" P-DEP -; V46 tmp42 [V46,T29] ( 2, 2 ) byref -> rbx single-def "field V05._reference (fldOffset=0x0)" P-INDEP -;* V47 tmp43 [V47,T38] ( 0, 0 ) int -> zero-ref "field V05._length (fldOffset=0x8)" P-INDEP -;* V48 tmp44 [V48 ] ( 0, 0 ) byref -> zero-ref "field V06._reference (fldOffset=0x0)" P-INDEP -;* V49 tmp45 [V49 ] ( 0, 0 ) int -> zero-ref "field V06._length (fldOffset=0x8)" P-INDEP -;* V50 tmp46 [V50 ] ( 0, 0 ) byref -> zero-ref "field V07._reference (fldOffset=0x0)" P-INDEP -;* V51 tmp47 [V51 ] ( 0, 0 ) int -> zero-ref "field V07._length (fldOffset=0x8)" P-INDEP -; V52 tmp48 [V52,T14] ( 2, 5 ) byref -> rbx single-def "field V10._reference (fldOffset=0x0)" P-INDEP -;* V53 tmp49 [V53,T39] ( 0, 0 ) int -> zero-ref "field V10._length (fldOffset=0x8)" P-INDEP -; V54 tmp50 [V54,T21] ( 3, 2 ) byref -> rbx "field V17._reference (fldOffset=0x0)" P-INDEP -; V55 tmp51 [V55,T23] ( 3, 2 ) int -> r14 "field V17._length (fldOffset=0x8)" P-INDEP -; V56 tmp52 [V56,T15] ( 2, 5 ) byref -> rbx single-def "field V18._reference (fldOffset=0x0)" P-INDEP -; V57 tmp53 [V57,T12] ( 3, 6 ) int -> r14 "field V18._length (fldOffset=0x8)" P-INDEP -; V58 tmp54 [V58,T22] ( 3, 2 ) byref -> registers "field V32._reference (fldOffset=0x0)" P-INDEP -; V59 tmp55 [V59,T24] ( 3, 2 ) int -> registers "field V32._length (fldOffset=0x8)" P-INDEP -; V60 tmp56 [V60,T30] ( 2, 2 ) byref -> r15 "field V36._reference (fldOffset=0x0)" P-INDEP -; V61 tmp57 [V61,T34] ( 2, 2 ) int -> rcx "field V36._length (fldOffset=0x8)" P-INDEP -; V62 tmp58 [V62,T31] ( 2, 2 ) byref -> r15 single-def "field V38._reference (fldOffset=0x0)" P-INDEP -; V63 tmp59 [V63,T35] ( 2, 2 ) int -> rcx "field V38._length (fldOffset=0x8)" P-INDEP -; V64 tmp60 [V64,T32] ( 2, 2 ) byref -> r15 single-def "field V39._reference (fldOffset=0x0)" P-INDEP -;* V65 tmp61 [V65 ] ( 0, 0 ) int -> zero-ref "field V39._length (fldOffset=0x8)" P-INDEP -;* V66 tmp62 [V66 ] ( 0, 0 ) byref -> zero-ref single-def "field V40._reference (fldOffset=0x0)" P-INDEP -;* V67 tmp63 [V67 ] ( 0, 0 ) int -> zero-ref "field V40._length (fldOffset=0x8)" P-INDEP -;* V68 tmp64 [V68 ] ( 0, 0 ) ref -> zero-ref single-def "argument with side effect" -; V69 cse0 [V69,T16] ( 5, 4 ) int -> rbx "CSE - moderate" +; V02 loc1 [V02 ] ( 14, 46 ) struct (352) [rbp-0x190] do-not-enreg[XS] addr-exposed ld-addr-op ptr +;* V03 loc2 [V03 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op +;* V04 loc3 [V04 ] ( 0, 0 ) struct (16) zero-ref +;# V05 OutArgs [V05 ] ( 1, 1 ) struct ( 0) [rsp+0x00] do-not-enreg[XS] addr-exposed "OutgoingArgSpace" +;* V06 tmp1 [V06 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V07 tmp2 [V07 ] ( 0, 0 ) struct (16) zero-ref "spilled call-like call argument" +; V08 tmp3 [V08 ] ( 1, 1 ) struct (16) [rbp-0x30] do-not-enreg[XS] addr-exposed ld-addr-op unsafe-buffer "stackallocLocal" +;* V09 tmp4 [V09 ] ( 0, 0 ) struct (16) zero-ref multireg-arg ld-addr-op "NewObj constructor temp" +; V10 tmp5 [V10,T20] ( 2, 4 ) struct (16) [rbp-0x1A0] do-not-enreg[SR] multireg-ret ld-addr-op ptr "NewObj constructor temp" +;* V11 tmp6 [V11 ] ( 0, 0 ) struct (16) zero-ref "spilled call-like call argument" +;* V12 tmp7 [V12 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inline stloc first use temp" +; V13 tmp8 [V13,T00] ( 5, 17 ) int -> r14 "Inline stloc first use temp" +; V14 tmp9 [V14,T12] ( 2, 8 ) ubyte -> rdi "Inline stloc first use temp" +; V15 tmp10 [V15,T02] ( 4, 16 ) int -> rax "Inline stloc first use temp" +;* V16 tmp11 [V16 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inline stloc first use temp" +; V17 tmp12 [V17,T04] ( 2, 16 ) byref -> rcx "impAppendStmt" +; V18 tmp13 [V18,T06] ( 3, 12 ) int -> rdi "Inline stloc first use temp" +;* V19 tmp14 [V19 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V20 tmp15 [V20 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +; V21 tmp16 [V21,T14] ( 4, 6 ) ref -> rax class-hnd single-def "Inlining Arg" +;* V22 tmp17 [V22 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V23 tmp18 [V23 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inline stloc first use temp" +; V24 tmp19 [V24,T01] ( 5, 17 ) int -> r14 "Inline stloc first use temp" +; V25 tmp20 [V25,T13] ( 2, 8 ) ubyte -> rdi "Inline stloc first use temp" +; V26 tmp21 [V26,T03] ( 4, 16 ) int -> rax "Inline stloc first use temp" +;* V27 tmp22 [V27 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inline stloc first use temp" +; V28 tmp23 [V28,T05] ( 2, 16 ) byref -> rcx "impAppendStmt" +; V29 tmp24 [V29,T07] ( 3, 12 ) int -> rdi "Inline stloc first use temp" +;* V30 tmp25 [V30 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V31 tmp26 [V31 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V32 tmp27 [V32 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inlining Arg" +;* V33 tmp28 [V33 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp" +;* V34 tmp29 [V34 ] ( 0, 0 ) byref -> zero-ref single-def ptr "Inlining Arg" +;* V35 tmp30 [V35 ] ( 0, 0 ) int -> zero-ref "Inlining Arg" +;* V36 tmp31 [V36 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inlining Arg" +;* V37 tmp32 [V37 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inlining Arg" +;* V38 tmp33 [V38 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "Inlining Arg" +;* V39 tmp34 [V39 ] ( 0, 0 ) byref -> zero-ref single-def ptr "field V01._reference (fldOffset=0x0)" P-INDEP +;* V40 tmp35 [V40 ] ( 0, 0 ) int -> zero-ref ptr "field V01._length (fldOffset=0x8)" P-INDEP +;* V41 tmp36 [V41 ] ( 0, 0 ) byref -> zero-ref single-def ptr "field V03._reference (fldOffset=0x0)" P-INDEP +;* V42 tmp37 [V42 ] ( 0, 0 ) int -> zero-ref ptr "field V03._length (fldOffset=0x8)" P-INDEP +;* V43 tmp38 [V43 ] ( 0, 0 ) byref -> zero-ref "field V04._reference (fldOffset=0x0)" P-INDEP +;* V44 tmp39 [V44 ] ( 0, 0 ) int -> zero-ref "field V04._length (fldOffset=0x8)" P-INDEP +; V45 tmp40 [V45,T23] ( 2, 2 ) byref -> r15 single-def "field V06._reference (fldOffset=0x0)" P-INDEP +;* V46 tmp41 [V46,T28] ( 0, 0 ) int -> zero-ref ptr "field V06._length (fldOffset=0x8)" P-INDEP +;* V47 tmp42 [V47 ] ( 0, 0 ) byref -> zero-ref "field V07._reference (fldOffset=0x0)" P-INDEP +;* V48 tmp43 [V48 ] ( 0, 0 ) int -> zero-ref "field V07._length (fldOffset=0x8)" P-INDEP +; V49 tmp44 [V49,T16] ( 5, 5 ) byref -> rbx single-def "field V09._reference (fldOffset=0x0)" P-INDEP +;* V50 tmp45 [V50,T29] ( 0, 0 ) int -> zero-ref ptr "field V09._length (fldOffset=0x8)" P-INDEP +;* V51 tmp46 [V51 ] ( 0, 0 ) byref -> zero-ref "field V11._reference (fldOffset=0x0)" P-INDEP +;* V52 tmp47 [V52 ] ( 0, 0 ) int -> zero-ref "field V11._length (fldOffset=0x8)" P-INDEP +; V53 tmp48 [V53,T18] ( 2, 5 ) byref -> r15 single-def "field V12._reference (fldOffset=0x0)" P-INDEP +;* V54 tmp49 [V54,T30] ( 0, 0 ) int -> zero-ref ptr "field V12._length (fldOffset=0x8)" P-INDEP +;* V55 tmp50 [V55 ] ( 0, 0 ) byref -> zero-ref ptr "field V16._reference (fldOffset=0x0)" P-INDEP +;* V56 tmp51 [V56 ] ( 0, 0 ) int -> zero-ref "field V16._length (fldOffset=0x8)" P-INDEP +; V57 tmp52 [V57,T08] ( 2, 8 ) byref -> rcx "field V19._reference (fldOffset=0x0)" P-INDEP +;* V58 tmp53 [V58 ] ( 0, 0 ) int -> zero-ref "field V19._length (fldOffset=0x8)" P-INDEP +; V59 tmp54 [V59,T09] ( 2, 8 ) byref -> rdx "field V20._reference (fldOffset=0x0)" P-INDEP +;* V60 tmp55 [V60 ] ( 0, 0 ) int -> zero-ref "field V20._length (fldOffset=0x8)" P-INDEP +; V61 tmp56 [V61,T21] ( 3, 2 ) byref -> rbx "field V22._reference (fldOffset=0x0)" P-INDEP +; V62 tmp57 [V62,T22] ( 3, 2 ) int -> r15 "field V22._length (fldOffset=0x8)" P-INDEP +; V63 tmp58 [V63,T19] ( 2, 5 ) byref -> rbx single-def "field V23._reference (fldOffset=0x0)" P-INDEP +; V64 tmp59 [V64,T15] ( 3, 6 ) int -> r15 "field V23._length (fldOffset=0x8)" P-INDEP +;* V65 tmp60 [V65 ] ( 0, 0 ) byref -> zero-ref ptr "field V27._reference (fldOffset=0x0)" P-INDEP +;* V66 tmp61 [V66 ] ( 0, 0 ) int -> zero-ref "field V27._length (fldOffset=0x8)" P-INDEP +; V67 tmp62 [V67,T10] ( 2, 8 ) byref -> rcx "field V30._reference (fldOffset=0x0)" P-INDEP +;* V68 tmp63 [V68 ] ( 0, 0 ) int -> zero-ref "field V30._length (fldOffset=0x8)" P-INDEP +; V69 tmp64 [V69,T11] ( 2, 8 ) byref -> rdx "field V31._reference (fldOffset=0x0)" P-INDEP +;* V70 tmp65 [V70 ] ( 0, 0 ) int -> zero-ref "field V31._length (fldOffset=0x8)" P-INDEP +;* V71 tmp66 [V71 ] ( 0, 0 ) byref -> zero-ref single-def ptr "field V32._reference (fldOffset=0x0)" P-INDEP +;* V72 tmp67 [V72 ] ( 0, 0 ) int -> zero-ref ptr "field V32._length (fldOffset=0x8)" P-INDEP +; V73 tmp68 [V73,T24] ( 2, 2 ) byref -> rbx single-def "field V33._reference (fldOffset=0x0)" P-INDEP +;* V74 tmp69 [V74,T31] ( 0, 0 ) int -> zero-ref "field V33._length (fldOffset=0x8)" P-INDEP +; V75 tmp70 [V75,T25] ( 2, 2 ) byref -> rbx single-def "field V36._reference (fldOffset=0x0)" P-INDEP +;* V76 tmp71 [V76,T32] ( 0, 0 ) int -> zero-ref "field V36._length (fldOffset=0x8)" P-INDEP +; V77 tmp72 [V77,T26] ( 2, 2 ) byref -> rbx single-def "field V37._reference (fldOffset=0x0)" P-INDEP +;* V78 tmp73 [V78 ] ( 0, 0 ) int -> zero-ref "field V37._length (fldOffset=0x8)" P-INDEP +;* V79 tmp74 [V79 ] ( 0, 0 ) byref -> zero-ref single-def ptr "field V38._reference (fldOffset=0x0)" P-INDEP +;* V80 tmp75 [V80 ] ( 0, 0 ) int -> zero-ref "field V38._length (fldOffset=0x8)" P-INDEP +; V81 GsCookie [V81 ] ( 1, 1 ) long -> [rbp-0x20] do-not-enreg[X] addr-exposed "GSSecurityCookie" +; V82 tmp77 [V82,T27] ( 2, 2 ) ref -> rbx single-def "shadowVar" ; -; Lcl frame size = 48 +; Lcl frame size = 392 G_M47710_IG01: push rbp push r15 push r14 - push r13 push rbx - sub rsp, 48 + sub rsp, 392 vzeroupper - lea rbp, [rsp+0x50] - vxorps xmm8, xmm8, xmm8 - vmovdqu xmmword ptr [rbp-0x38], xmm8 - xor eax, eax - mov qword ptr [rbp-0x28], rax - mov rsi, rdi - ;; size=39 bbWeight=1 PerfScore 10.58 + lea rbp, [rsp+0x1A0] + mov qword ptr [rbp-0x20], 0xD1FFAB1E + ;; size=32 bbWeight=1 PerfScore 6.75 G_M47710_IG02: - mov rbx, 0xD1FFAB1E ; data for :BABB0FF3A59F6738CDF14170DA56230D6528DC9D619C5860288B86A4E3B29D63 - mov rdi, 0xD1FFAB1E ; const ptr - mov rdi, gword ptr [rdi] - mov rax, 0xD1FFAB1E ; code for System.Text.Encoding:GetBytes(System.String):ubyte[]:this - call [rax]System.Text.Encoding:GetBytes(System.String):ubyte[]:this - mov r15, rax - lea rdi, [rbp-0x38] - mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Start():this - call [rax]System.Sha1ForNonSecretPurposes:Start():this + mov rbx, rdi + mov r15, 0xD1FFAB1E ; data for :BABB0FF3A59F6738CDF14170DA56230D6528DC9D619C5860288B86A4E3B29D63 + lea rdi, [rbp-0x190] + mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:.ctor():this + call [rax]System.Sha1ForNonSecretPurposes:.ctor():this xor r14d, r14d - ;; size=57 bbWeight=1 PerfScore 10.00 + ;; size=35 bbWeight=1 PerfScore 4.50 G_M47710_IG03: mov edi, r14d - movzx rdi, byte ptr [rbx+rdi] - mov eax, dword ptr [rbp-0x28] + movzx rdi, byte ptr [r15+rdi] + mov eax, dword ptr [rbp-0x34] sar eax, 2 - mov rcx, gword ptr [rbp-0x38] - cmp eax, dword ptr [rcx+0x08] - jae G_M47710_IG22 - mov rcx, gword ptr [rbp-0x38] + lea rcx, bword ptr [rbp-0x188] + cmp eax, 85 + jae G_M47710_IG16 mov edx, eax - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - or edi, ecx - mov rcx, gword ptr [rbp-0x38] - cmp eax, dword ptr [rcx+0x08] - jae G_M47710_IG22 - mov rcx, gword ptr [rbp-0x38] - mov dword ptr [rcx+4*rax+0x10], edi - mov edi, dword ptr [rbp-0x28] + lea rcx, bword ptr [rcx+4*rdx] + lea rdx, bword ptr [rbp-0x188] + mov eax, dword ptr [rdx+4*rax] + shl eax, 8 + or edi, eax + mov dword ptr [rcx], edi + mov edi, dword ptr [rbp-0x34] inc edi - mov dword ptr [rbp-0x28], edi + mov dword ptr [rbp-0x34], edi cmp edi, 64 jne SHORT G_M47710_IG05 - ;; size=76 bbWeight=4 PerfScore 93.00 + ;; size=66 bbWeight=4 PerfScore 56.00 G_M47710_IG04: - lea rdi, [rbp-0x38] + lea rdi, [rbp-0x190] mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=16 bbWeight=2 PerfScore 7.50 + ;; size=19 bbWeight=2 PerfScore 7.50 G_M47710_IG05: inc r14d cmp r14d, 16 jl SHORT G_M47710_IG03 ;; size=9 bbWeight=4 PerfScore 6.00 G_M47710_IG06: - mov rdi, r15 - test rdi, rdi + mov rdi, 0xD1FFAB1E ; const ptr + mov rdi, gword ptr [rdi] + mov rsi, rbx + mov rax, 0xD1FFAB1E ; code for System.Text.Encoding:GetBytes(System.String):ubyte[]:this + call [rax]System.Text.Encoding:GetBytes(System.String):ubyte[]:this + test rax, rax jne SHORT G_M47710_IG08 - ;; size=8 bbWeight=1 PerfScore 1.50 + ;; size=33 bbWeight=1 PerfScore 7.00 G_M47710_IG07: xor rbx, rbx - xor r14d, r14d + xor r15d, r15d jmp SHORT G_M47710_IG09 ;; size=7 bbWeight=0.50 PerfScore 1.25 G_M47710_IG08: - lea rbx, bword ptr [r15+0x10] - mov r14d, dword ptr [r15+0x08] + lea rbx, bword ptr [rax+0x10] + mov r15d, dword ptr [rax+0x08] ;; size=8 bbWeight=0.50 PerfScore 1.25 G_M47710_IG09: - xor r13d, r13d - test r14d, r14d + xor r14d, r14d + test r15d, r15d jle SHORT G_M47710_IG13 ;; size=8 bbWeight=1 PerfScore 1.50 G_M47710_IG10: - mov edi, r13d + mov edi, r14d movzx rdi, byte ptr [rbx+rdi] - mov eax, dword ptr [rbp-0x28] + mov eax, dword ptr [rbp-0x34] sar eax, 2 - mov rcx, gword ptr [rbp-0x38] - cmp eax, dword ptr [rcx+0x08] - jae G_M47710_IG22 - mov rcx, gword ptr [rbp-0x38] + lea rcx, bword ptr [rbp-0x188] + cmp eax, 85 + jae G_M47710_IG16 mov edx, eax - mov ecx, dword ptr [rcx+4*rdx+0x10] - shl ecx, 8 - or edi, ecx - mov rcx, gword ptr [rbp-0x38] - cmp eax, dword ptr [rcx+0x08] - jae G_M47710_IG22 - mov rcx, gword ptr [rbp-0x38] - mov dword ptr [rcx+4*rax+0x10], edi - mov edi, dword ptr [rbp-0x28] + lea rcx, bword ptr [rcx+4*rdx] + lea rdx, bword ptr [rbp-0x188] + mov eax, dword ptr [rdx+4*rax] + shl eax, 8 + or edi, eax + mov dword ptr [rcx], edi + mov edi, dword ptr [rbp-0x34] inc edi - mov dword ptr [rbp-0x28], edi + mov dword ptr [rbp-0x34], edi cmp edi, 64 jne SHORT G_M47710_IG12 - ;; size=76 bbWeight=4 PerfScore 93.00 + ;; size=66 bbWeight=4 PerfScore 56.00 G_M47710_IG11: - lea rdi, [rbp-0x38] + lea rdi, [rbp-0x190] mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Drain():this call [rax]System.Sha1ForNonSecretPurposes:Drain():this - ;; size=16 bbWeight=2 PerfScore 7.50 + ;; size=19 bbWeight=2 PerfScore 7.50 G_M47710_IG12: - inc r13d - cmp r13d, r14d + inc r14d + cmp r14d, r15d jl SHORT G_M47710_IG10 ;; size=8 bbWeight=4 PerfScore 6.00 G_M47710_IG13: - mov rbx, r15 - test rbx, rbx - jne SHORT G_M47710_IG15 - ;; size=8 bbWeight=1 PerfScore 1.50 -G_M47710_IG14: - mov rdi, 0xD1FFAB1E ; ubyte[] - mov esi, 16 - call CORINFO_HELP_NEWARR_1_VC - mov r15, rax - jmp SHORT G_M47710_IG16 - ;; size=25 bbWeight=0.50 PerfScore 1.88 -G_M47710_IG15: - cmp dword ptr [r15+0x08], 16 - je SHORT G_M47710_IG16 - mov rdi, 0xD1FFAB1E ; ubyte[] - mov esi, 16 - call CORINFO_HELP_NEWARR_1_VC - mov r15, rax - lea rdi, bword ptr [r15+0x10] - lea rsi, bword ptr [rbx+0x10] - mov edx, dword ptr [rbx+0x08] - mov eax, 16 - cmp edx, 16 - cmovl eax, edx - mov edx, eax - mov rax, 0xD1FFAB1E ; code for System.Buffer:Memmove(byref,byref,ulong) - call [rax]System.Buffer:Memmove(byref,byref,ulong) - ;; size=66 bbWeight=0.50 PerfScore 6.50 -G_M47710_IG16: - mov rsi, r15 - test rsi, rsi - jne SHORT G_M47710_IG18 - ;; size=8 bbWeight=1 PerfScore 1.50 -G_M47710_IG17: - xor rsi, rsi - xor edx, edx - jmp SHORT G_M47710_IG19 - ;; size=6 bbWeight=0.50 PerfScore 1.25 -G_M47710_IG18: - lea rdx, bword ptr [rsi+0x10] - mov ebx, dword ptr [rsi+0x08] - mov rsi, rdx - mov edx, ebx - ;; size=12 bbWeight=0.50 PerfScore 1.50 -G_M47710_IG19: - lea rdi, [rbp-0x38] + lea rbx, [rbp-0x30] + mov rsi, rbx + mov edx, 16 + lea rdi, [rbp-0x190] mov rax, 0xD1FFAB1E ; code for System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this call [rax]System.Sha1ForNonSecretPurposes:Finish(System.Span`1[ubyte]):this - mov ebx, dword ptr [r15+0x08] - cmp ebx, 7 - jbe SHORT G_M47710_IG22 - movzx rax, byte ptr [r15+0x17] + movzx rax, byte ptr [rbx+0x07] and eax, 15 or eax, 80 - mov byte ptr [r15+0x17], al - vxorps xmm0, xmm0, xmm0 - vmovups xmmword ptr [rbp-0x48], xmm0 - lea rax, bword ptr [rbp-0x48] - add r15, 16 - mov ecx, ebx - cmp ecx, 16 - jne SHORT G_M47710_IG21 - vmovups xmm0, xmmword ptr [r15] - vmovups xmmword ptr [rax], xmm0 - mov rax, qword ptr [rbp-0x48] - mov rdx, qword ptr [rbp-0x40] - ;; size=81 bbWeight=1 PerfScore 22.08 -G_M47710_IG20: - add rsp, 48 + mov byte ptr [rbx+0x07], al + vmovups xmm0, xmmword ptr [rbx] + vmovups xmmword ptr [rbp-0x1A0], xmm0 + mov rax, qword ptr [rbp-0x1A0] + mov rdx, qword ptr [rbp-0x198] + cmp qword ptr [rbp-0x20], 0xD1FFAB1E + je SHORT G_M47710_IG14 + call CORINFO_HELP_FAIL_FAST + ;; size=85 bbWeight=1 PerfScore 19.25 +G_M47710_IG14: + nop + ;; size=1 bbWeight=1 PerfScore 0.25 +G_M47710_IG15: + add rsp, 392 pop rbx - pop r13 pop r14 pop r15 pop rbp ret - ;; size=13 bbWeight=1 PerfScore 3.75 -G_M47710_IG21: - mov rax, 0xD1FFAB1E ; code for System.Guid:ThrowGuidArrayCtorArgumentException() - call [rax]System.Guid:ThrowGuidArrayCtorArgumentException() - int3 - ;; size=13 bbWeight=0 PerfScore 0.00 -G_M47710_IG22: + ;; size=14 bbWeight=1 PerfScore 3.25 +G_M47710_IG16: call CORINFO_HELP_RNGCHKFAIL int3 ;; size=6 bbWeight=0 PerfScore 0.00 -; Total bytes of code 566, prolog size 39, PerfScore 335.64, instruction count 156, allocated bytes for code 566 (MethodHash=593645a1) for method System.Diagnostics.Tracing.EventSource:GenerateGuidFromName(System.String):System.Guid (FullOpts) +; Total bytes of code 416, prolog size 32, PerfScore 225.60, instruction count 105, allocated bytes for code 416 (MethodHash=593645a1) for method System.Diagnostics.Tracing.EventSource:GenerateGuidFromName(System.String):System.Guid (FullOpts) ```

Larger list of diffs: https://gist.github.com/MihuBot/265ad87d58307b4c44e9b6d7944c8f34

MihuBot commented 1 year ago

@MihaZupan