forked from MihaZupan/runtime-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[MichalPetryka] Intrinsify Array GetArrayDataReference for SZ arrays #76
Comments
Top method improvements-6 (-30.00 % of base) - System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[double,long]:GetPinnableReference(ulong[]):byref ; Assembly listing for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[double,long]:GetPinnableReference(ulong[]):byref (FullOpts)
; Emitting BLENDED_CODE for X64 with AVX - Unix
; FullOpts code
; optimized code
; rsp based frame
; partially interruptible
; No PGO data
-; 0 inlinees with PGO data; 2 single block inlinees; 0 inlinees without PGO data
; Final local variable assignments
;
-; V00 arg0 [V00,T00] ( 5, 4 ) ref -> rdi class-hnd single-def
+; V00 arg0 [V00,T00] ( 4, 4 ) ref -> rdi class-hnd single-def
;# V01 OutArgs [V01 ] ( 1, 1 ) struct ( 0) [rsp+00H] do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;* V02 tmp1 [V02 ] ( 0, 0 ) byref -> zero-ref "impAppendStmt"
;
; Lcl frame size = 0
G_M54100_IG01:
;; size=0 bbWeight=1 PerfScore 0.00
G_M54100_IG02:
+ lea rax, bword ptr [rdi+10H]
+ xor rcx, rcx
test rdi, rdi
- jne SHORT G_M54100_IG05
- ;; size=5 bbWeight=1 PerfScore 1.25
+ cmove rax, rcx
+ ;; size=13 bbWeight=1 PerfScore 1.25
G_M54100_IG03:
- xor rax, rax
- ;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M54100_IG04:
ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
-G_M54100_IG05:
- mov rax, qword ptr [rdi]
- mov eax, dword ptr [rax+04H]
- lea rax, bword ptr [rdi+rax-08H]
- ;; size=11 bbWeight=0.50 PerfScore 2.50
-G_M54100_IG06:
- ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
+ ;; size=1 bbWeight=1 PerfScore 1.00
-; Total bytes of code 20, prolog size 0, PerfScore 6.88, instruction count 8, allocated bytes for code 20 (MethodHash=33252cab) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[double,long]:GetPinnableReference(ulong[]):byref (FullOpts)
+; Total bytes of code 14, prolog size 0, PerfScore 3.65, instruction count 5, allocated bytes for code 14 (MethodHash=33252cab) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[double,long]:GetPinnableReference(ulong[]):byref (FullOpts) -6 (-30.00 % of base) - System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[int,long]:GetPinnableReference(ulong[]):byref ; Assembly listing for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[int,long]:GetPinnableReference(ulong[]):byref (FullOpts)
; Emitting BLENDED_CODE for X64 with AVX - Unix
; FullOpts code
; optimized code
; rsp based frame
; partially interruptible
; No PGO data
-; 0 inlinees with PGO data; 2 single block inlinees; 0 inlinees without PGO data
; Final local variable assignments
;
-; V00 arg0 [V00,T00] ( 5, 4 ) ref -> rdi class-hnd single-def
+; V00 arg0 [V00,T00] ( 4, 4 ) ref -> rdi class-hnd single-def
;# V01 OutArgs [V01 ] ( 1, 1 ) struct ( 0) [rsp+00H] do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;* V02 tmp1 [V02 ] ( 0, 0 ) byref -> zero-ref "impAppendStmt"
;
; Lcl frame size = 0
G_M44274_IG01:
;; size=0 bbWeight=1 PerfScore 0.00
G_M44274_IG02:
+ lea rax, bword ptr [rdi+10H]
+ xor rcx, rcx
test rdi, rdi
- jne SHORT G_M44274_IG05
- ;; size=5 bbWeight=1 PerfScore 1.25
+ cmove rax, rcx
+ ;; size=13 bbWeight=1 PerfScore 1.25
G_M44274_IG03:
- xor rax, rax
- ;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M44274_IG04:
ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
-G_M44274_IG05:
- mov rax, qword ptr [rdi]
- mov eax, dword ptr [rax+04H]
- lea rax, bword ptr [rdi+rax-08H]
- ;; size=11 bbWeight=0.50 PerfScore 2.50
-G_M44274_IG06:
- ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
+ ;; size=1 bbWeight=1 PerfScore 1.00
-; Total bytes of code 20, prolog size 0, PerfScore 6.88, instruction count 8, allocated bytes for code 20 (MethodHash=78b3530d) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[int,long]:GetPinnableReference(ulong[]):byref (FullOpts)
+; Total bytes of code 14, prolog size 0, PerfScore 3.65, instruction count 5, allocated bytes for code 14 (MethodHash=78b3530d) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[int,long]:GetPinnableReference(ulong[]):byref (FullOpts) -6 (-30.00 % of base) - System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[long,long]:GetPinnableReference(ulong[]):byref ; Assembly listing for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[long,long]:GetPinnableReference(ulong[]):byref (FullOpts)
; Emitting BLENDED_CODE for X64 with AVX - Unix
; FullOpts code
; optimized code
; rsp based frame
; partially interruptible
; No PGO data
-; 0 inlinees with PGO data; 2 single block inlinees; 0 inlinees without PGO data
; Final local variable assignments
;
-; V00 arg0 [V00,T00] ( 5, 4 ) ref -> rdi class-hnd single-def
+; V00 arg0 [V00,T00] ( 4, 4 ) ref -> rdi class-hnd single-def
;# V01 OutArgs [V01 ] ( 1, 1 ) struct ( 0) [rsp+00H] do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;* V02 tmp1 [V02 ] ( 0, 0 ) byref -> zero-ref "impAppendStmt"
;
; Lcl frame size = 0
G_M27755_IG01:
;; size=0 bbWeight=1 PerfScore 0.00
G_M27755_IG02:
+ lea rax, bword ptr [rdi+10H]
+ xor rcx, rcx
test rdi, rdi
- jne SHORT G_M27755_IG05
- ;; size=5 bbWeight=1 PerfScore 1.25
+ cmove rax, rcx
+ ;; size=13 bbWeight=1 PerfScore 1.25
G_M27755_IG03:
- xor rax, rax
- ;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M27755_IG04:
ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
-G_M27755_IG05:
- mov rax, qword ptr [rdi]
- mov eax, dword ptr [rax+04H]
- lea rax, bword ptr [rdi+rax-08H]
- ;; size=11 bbWeight=0.50 PerfScore 2.50
-G_M27755_IG06:
- ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
+ ;; size=1 bbWeight=1 PerfScore 1.00
-; Total bytes of code 20, prolog size 0, PerfScore 6.88, instruction count 8, allocated bytes for code 20 (MethodHash=1eeb9394) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[long,long]:GetPinnableReference(ulong[]):byref (FullOpts)
+; Total bytes of code 14, prolog size 0, PerfScore 3.65, instruction count 5, allocated bytes for code 14 (MethodHash=1eeb9394) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[long,long]:GetPinnableReference(ulong[]):byref (FullOpts) -6 (-30.00 % of base) - System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[short,long]:GetPinnableReference(ulong[]):byref ; Assembly listing for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[short,long]:GetPinnableReference(ulong[]):byref (FullOpts)
; Emitting BLENDED_CODE for X64 with AVX - Unix
; FullOpts code
; optimized code
; rsp based frame
; partially interruptible
; No PGO data
-; 0 inlinees with PGO data; 2 single block inlinees; 0 inlinees without PGO data
; Final local variable assignments
;
-; V00 arg0 [V00,T00] ( 5, 4 ) ref -> rdi class-hnd single-def
+; V00 arg0 [V00,T00] ( 4, 4 ) ref -> rdi class-hnd single-def
;# V01 OutArgs [V01 ] ( 1, 1 ) struct ( 0) [rsp+00H] do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;* V02 tmp1 [V02 ] ( 0, 0 ) byref -> zero-ref "impAppendStmt"
;
; Lcl frame size = 0
G_M3059_IG01:
;; size=0 bbWeight=1 PerfScore 0.00
G_M3059_IG02:
+ lea rax, bword ptr [rdi+10H]
+ xor rcx, rcx
test rdi, rdi
- jne SHORT G_M3059_IG05
- ;; size=5 bbWeight=1 PerfScore 1.25
+ cmove rax, rcx
+ ;; size=13 bbWeight=1 PerfScore 1.25
G_M3059_IG03:
- xor rax, rax
- ;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M3059_IG04:
ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
-G_M3059_IG05:
- mov rax, qword ptr [rdi]
- mov eax, dword ptr [rax+04H]
- lea rax, bword ptr [rdi+rax-08H]
- ;; size=11 bbWeight=0.50 PerfScore 2.50
-G_M3059_IG06:
- ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
+ ;; size=1 bbWeight=1 PerfScore 1.00
-; Total bytes of code 20, prolog size 0, PerfScore 6.88, instruction count 8, allocated bytes for code 20 (MethodHash=4012f40c) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[short,long]:GetPinnableReference(ulong[]):byref (FullOpts)
+; Total bytes of code 14, prolog size 0, PerfScore 3.65, instruction count 5, allocated bytes for code 14 (MethodHash=4012f40c) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[short,long]:GetPinnableReference(ulong[]):byref (FullOpts) -6 (-30.00 % of base) - System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[System.Numerics.Vector`1[float],long]:GetPinnableReference(ulong[]):byref ; Assembly listing for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[System.Numerics.Vector`1[float],long]:GetPinnableReference(ulong[]):byref (FullOpts)
; Emitting BLENDED_CODE for X64 with AVX - Unix
; FullOpts code
; optimized code
; rsp based frame
; partially interruptible
; No PGO data
-; 0 inlinees with PGO data; 2 single block inlinees; 0 inlinees without PGO data
; Final local variable assignments
;
-; V00 arg0 [V00,T00] ( 5, 4 ) ref -> rdi class-hnd single-def
+; V00 arg0 [V00,T00] ( 4, 4 ) ref -> rdi class-hnd single-def
;# V01 OutArgs [V01 ] ( 1, 1 ) struct ( 0) [rsp+00H] do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;* V02 tmp1 [V02 ] ( 0, 0 ) byref -> zero-ref "impAppendStmt"
;
; Lcl frame size = 0
G_M13410_IG01:
;; size=0 bbWeight=1 PerfScore 0.00
G_M13410_IG02:
+ lea rax, bword ptr [rdi+10H]
+ xor rcx, rcx
test rdi, rdi
- jne SHORT G_M13410_IG05
- ;; size=5 bbWeight=1 PerfScore 1.25
+ cmove rax, rcx
+ ;; size=13 bbWeight=1 PerfScore 1.25
G_M13410_IG03:
- xor rax, rax
- ;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M13410_IG04:
ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
-G_M13410_IG05:
- mov rax, qword ptr [rdi]
- mov eax, dword ptr [rax+04H]
- lea rax, bword ptr [rdi+rax-08H]
- ;; size=11 bbWeight=0.50 PerfScore 2.50
-G_M13410_IG06:
- ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
+ ;; size=1 bbWeight=1 PerfScore 1.00
-; Total bytes of code 20, prolog size 0, PerfScore 6.88, instruction count 8, allocated bytes for code 20 (MethodHash=84f6cb9d) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[System.Numerics.Vector`1[float],long]:GetPinnableReference(ulong[]):byref (FullOpts)
+; Total bytes of code 14, prolog size 0, PerfScore 3.65, instruction count 5, allocated bytes for code 14 (MethodHash=84f6cb9d) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[System.Numerics.Vector`1[float],long]:GetPinnableReference(ulong[]):byref (FullOpts) -6 (-30.00 % of base) - System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[ubyte,long]:GetPinnableReference(ulong[]):byref ; Assembly listing for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[ubyte,long]:GetPinnableReference(ulong[]):byref (FullOpts)
; Emitting BLENDED_CODE for X64 with AVX - Unix
; FullOpts code
; optimized code
; rsp based frame
; partially interruptible
; No PGO data
-; 0 inlinees with PGO data; 2 single block inlinees; 0 inlinees without PGO data
; Final local variable assignments
;
-; V00 arg0 [V00,T00] ( 5, 4 ) ref -> rdi class-hnd single-def
+; V00 arg0 [V00,T00] ( 4, 4 ) ref -> rdi class-hnd single-def
;# V01 OutArgs [V01 ] ( 1, 1 ) struct ( 0) [rsp+00H] do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;* V02 tmp1 [V02 ] ( 0, 0 ) byref -> zero-ref "impAppendStmt"
;
; Lcl frame size = 0
G_M26878_IG01:
;; size=0 bbWeight=1 PerfScore 0.00
G_M26878_IG02:
+ lea rax, bword ptr [rdi+10H]
+ xor rcx, rcx
test rdi, rdi
- jne SHORT G_M26878_IG05
- ;; size=5 bbWeight=1 PerfScore 1.25
+ cmove rax, rcx
+ ;; size=13 bbWeight=1 PerfScore 1.25
G_M26878_IG03:
- xor rax, rax
- ;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M26878_IG04:
ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
-G_M26878_IG05:
- mov rax, qword ptr [rdi]
- mov eax, dword ptr [rax+04H]
- lea rax, bword ptr [rdi+rax-08H]
- ;; size=11 bbWeight=0.50 PerfScore 2.50
-G_M26878_IG06:
- ret
- ;; size=1 bbWeight=0.50 PerfScore 0.50
+ ;; size=1 bbWeight=1 PerfScore 1.00
-; Total bytes of code 20, prolog size 0, PerfScore 6.88, instruction count 8, allocated bytes for code 20 (MethodHash=31f69701) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[ubyte,long]:GetPinnableReference(ulong[]):byref (FullOpts)
+; Total bytes of code 14, prolog size 0, PerfScore 3.65, instruction count 5, allocated bytes for code 14 (MethodHash=31f69701) for method System.Runtime.InteropServices.Marshalling.PointerArrayMarshaller`2+ManagedToUnmanagedIn[ubyte,long]:GetPinnableReference(ulong[]):byref (FullOpts) |
cc: @MichalPetryka |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build completed in 1 hour 57 minutes.
dotnet/runtime#87374
CoreLib diffs
Frameworks diffs
Diffs
Artifacts:
The text was updated successfully, but these errors were encountered: