Skip to content

Instantly share code, notes, and snippets.

@trylek
Created August 6, 2020 20:18
Show Gist options
  • Save trylek/e1e65fc9777efa6a416498d23697b9c4 to your computer and use it in GitHub Desktop.
Save trylek/e1e65fc9777efa6a416498d23697b9c4 to your computer and use it in GitHub Desktop.
jit-diff diff for the ExpansionPerf test
Unwind Info:
>> Start offset : 0x000000 (not in unwind data)
>> End offset : 0xd1ffab1e (not in unwind data)
Version : 1
Flags : 0x00
SizeOfProlog : 0x08
CountOfUnwindCodes: 5
FrameRegister : none (0)
FrameOffset : N/A (no FrameRegister) (Value=0)
UnwindCodes :
CodeOffset: 0x08 UnwindOp: UWOP_ALLOC_SMALL (2) OpInfo: 8 * 8 + 8 = 72 = 0x48
CodeOffset: 0x04 UnwindOp: UWOP_PUSH_NONVOL (0) OpInfo: rbx (3)
CodeOffset: 0x03 UnwindOp: UWOP_PUSH_NONVOL (0) OpInfo: rbp (5)
CodeOffset: 0x02 UnwindOp: UWOP_PUSH_NONVOL (0) OpInfo: rsi (6)
CodeOffset: 0x01 UnwindOp: UWOP_PUSH_NONVOL (0) OpInfo: rdi (7)
; Assembly listing for method Test:TestDict(IDictionary`2,Func`2)
; Emitting BLENDED_CODE for X64 CPU with AVX - Windows
; optimized code
; rsp based frame
; fully interruptible
; Final local variable assignments
;
; V00 TypeCtx [V00,T04] ( 15, 27.75) long -> rsi
; V01 arg0 [V01,T06] ( 4, 22 ) ref -> rdi class-hnd
; V02 arg1 [V02,T17] ( 3, 3 ) ref -> rbx class-hnd
; V03 loc0 [V03,T19] ( 4, 4 ) ref -> r14 class-hnd exact
; V04 loc1 [V04,T07] ( 4, 22 ) ref -> rbx class-hnd
;* V05 loc2 [V05 ] ( 0, 0 ) ref -> zero-ref class-hnd
; V06 loc3 [V06,T11] ( 5, 17 ) int -> rbp
; V07 loc4 [V07,T16] ( 2, 8 ) ref -> r15 class-hnd
; V08 loc5 [V08,T12] ( 4, 13 ) int -> rbp
; V09 loc6 [V09,T02] ( 5, 68 ) int -> r15
; V10 loc7 [V10,T03] ( 2, 32 ) ref -> r12 class-hnd
; V11 OutArgs [V11 ] ( 1, 1 ) lclBlk (32) [rsp+0x00] "OutgoingArgSpace"
; V12 tmp1 [V12,T20] ( 2, 4 ) ref -> r14 class-hnd exact "NewObj constructor temp"
; V13 tmp2 [V13,T25] ( 3, 3 ) long -> rcx "spilling Runtime Lookup tree"
; V14 tmp3 [V14,T14] ( 4, 8 ) ref -> r15 class-hnd exact "NewObj constructor temp"
; V15 tmp4 [V15,T21] ( 2, 4 ) ref -> rbx class-hnd "bubbling QMark1"
; V16 tmp5 [V16,T26] ( 3, 3 ) long -> rcx "spilling Runtime Lookup tree"
; V17 tmp6 [V17,T27] ( 3, 3 ) long -> rcx "spilling Runtime Lookup tree"
; V18 tmp7 [V18,T22] ( 2, 4 ) ref -> rbx class-hnd "bubbling QMark1"
; V19 tmp8 [V19,T28] ( 3, 3 ) long -> rcx "spilling Runtime Lookup tree"
; V20 tmp9 [V20,T15] ( 4, 8 ) ref -> r12 class-hnd exact "NewObj constructor temp"
; V21 tmp10 [V21,T23] ( 2, 4 ) ref -> r15 class-hnd "bubbling QMark1"
; V22 tmp11 [V22,T29] ( 3, 3 ) long -> rcx "spilling Runtime Lookup tree"
; V23 tmp12 [V23,T30] ( 3, 3 ) long -> rcx "spilling Runtime Lookup tree"
; V24 tmp13 [V24,T24] ( 2, 4 ) ref -> r14 class-hnd "bubbling QMark1"
; V25 tmp14 [V25,T31] ( 3, 3 ) long -> rcx "spilling Runtime Lookup tree"
; V26 tmp15 [V26,T09] ( 3, 19.20) long -> rcx "impRuntimeLookup indirectOffset"
; V27 tmp16 [V27,T08] ( 4, 20 ) long -> r11 "spilling Runtime Lookup tree"
;* V28 tmp17 [V28 ] ( 0, 0 ) long -> zero-ref "VirtualCall with runtime lookup"
; V29 tmp18 [V29,T01] ( 3, 76.80) long -> rcx "impRuntimeLookup indirectOffset"
; V30 tmp19 [V30,T00] ( 4, 80 ) long -> r11 "spilling Runtime Lookup tree"
;* V31 tmp20 [V31 ] ( 0, 0 ) long -> zero-ref "VirtualCall with runtime lookup"
;* V32 tmp21 [V32 ] ( 0, 0 ) long -> zero-ref "Inlining Arg"
;* V33 tmp22 [V33 ] ( 0, 0 ) long -> zero-ref "Inlining Arg"
; V34 cse0 [V34,T13] ( 15, 9.75) long -> rbp "CSE - aggressive"
; V35 cse1 [V35,T10] ( 3, 19.20) long -> r11 "CSE - aggressive"
; V36 cse2 [V36,T18] ( 3, 4.80) long -> r11 "CSE - moderate"
; V37 cse3 [V37,T05] ( 5, 26 ) int -> r14 "CSE - aggressive"
;
; Lcl frame size = 48
G_M27032_IG01:
push r15
push r14
push r12
push rdi
push rsi
push rbp
push rbx
sub rsp, 48
mov qword ptr [rsp+28H], rcx
mov rsi, rcx
mov rdi, rdx
mov rbx, r8
;; bbWeight=1 PerfScore 9.00
G_M27032_IG02:
mov rbp, qword ptr [rsi+16]
cmp qword ptr [rbp+16], 0
je SHORT G_M27032_IG04
;; bbWeight=1 PerfScore 5.00
G_M27032_IG03:
mov rcx, qword ptr [rbp+16]
jmp SHORT G_M27032_IG05
;; bbWeight=0.25 PerfScore 1.00
G_M27032_IG04:
mov rcx, rsi
mov rdx, 0xD1FFAB1E
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov rcx, rax
;; bbWeight=0.25 PerfScore 0.44
G_M27032_IG05:
call CORINFO_HELP_NEWSFAST
mov r14, rax
lea rcx, bword ptr [r14+8]
mov rdx, rbx
call CORINFO_HELP_ASSIGN_REF
xor ecx, ecx
mov edx, 0x186A0
call Enumerable:Range(int,int):IEnumerable`1
mov rbx, rax
cmp qword ptr [rbp+24], 0
je SHORT G_M27032_IG07
;; bbWeight=1 PerfScore 7.75
G_M27032_IG06:
mov rcx, qword ptr [rbp+24]
jmp SHORT G_M27032_IG08
;; bbWeight=0.25 PerfScore 1.00
G_M27032_IG07:
mov rcx, rsi
mov rdx, 0xD1FFAB1E
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov rcx, rax
;; bbWeight=0.25 PerfScore 0.44
G_M27032_IG08:
call CORINFO_HELP_NEWSFAST
mov r15, rax
lea rcx, bword ptr [r15+8]
mov rdx, r14
call CORINFO_HELP_ASSIGN_REF
mov rcx, 0xD1FFAB1E
mov qword ptr [r15+24], rcx
cmp qword ptr [rbp+32], 0
je SHORT G_M27032_IG10
;; bbWeight=1 PerfScore 7.25
G_M27032_IG09:
mov rcx, qword ptr [rbp+32]
jmp SHORT G_M27032_IG11
;; bbWeight=0.25 PerfScore 1.00
G_M27032_IG10:
mov rcx, rsi
mov rdx, 0xD1FFAB1E
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov rcx, rax
;; bbWeight=0.25 PerfScore 0.44
G_M27032_IG11:
mov rdx, rbx
mov r8, r15
call Enumerable:Select(IEnumerable`1,Func`2):IEnumerable`1
mov rbx, rax
cmp qword ptr [rbp+40], 0
je SHORT G_M27032_IG13
;; bbWeight=1 PerfScore 4.75
G_M27032_IG12:
mov rcx, qword ptr [rbp+40]
jmp SHORT G_M27032_IG14
;; bbWeight=0.25 PerfScore 1.00
G_M27032_IG13:
mov rcx, rsi
mov rdx, 0xD1FFAB1E
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov rcx, rax
;; bbWeight=0.25 PerfScore 0.44
G_M27032_IG14:
mov rdx, rbx
call Enumerable:ToArray(IEnumerable`1):ref
mov rbx, rax
mov ecx, 0x186A0
mov edx, 0x186A0
call Enumerable:Range(int,int):IEnumerable`1
mov r15, rax
cmp qword ptr [rbp+24], 0
je SHORT G_M27032_IG16
;; bbWeight=1 PerfScore 6.25
G_M27032_IG15:
mov rcx, qword ptr [rbp+24]
jmp SHORT G_M27032_IG17
;; bbWeight=0.25 PerfScore 1.00
G_M27032_IG16:
mov rcx, rsi
mov rdx, 0xD1FFAB1E
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov rcx, rax
;; bbWeight=0.25 PerfScore 0.44
G_M27032_IG17:
call CORINFO_HELP_NEWSFAST
mov r12, rax
lea rcx, bword ptr [r12+8]
mov rdx, r14
call CORINFO_HELP_ASSIGN_REF
mov rcx, 0xD1FFAB1E
mov qword ptr [r12+24], rcx
cmp qword ptr [rbp+32], 0
je SHORT G_M27032_IG19
;; bbWeight=1 PerfScore 7.25
G_M27032_IG18:
mov rcx, qword ptr [rbp+32]
jmp SHORT G_M27032_IG20
;; bbWeight=0.25 PerfScore 1.00
G_M27032_IG19:
mov rcx, rsi
mov rdx, 0xD1FFAB1E
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov rcx, rax
;; bbWeight=0.25 PerfScore 0.44
G_M27032_IG20:
mov rdx, r15
mov r8, r12
call Enumerable:Select(IEnumerable`1,Func`2):IEnumerable`1
mov r14, rax
cmp qword ptr [rbp+40], 0
je SHORT G_M27032_IG22
;; bbWeight=1 PerfScore 4.75
G_M27032_IG21:
mov rcx, qword ptr [rbp+40]
jmp SHORT G_M27032_IG23
;; bbWeight=0.25 PerfScore 1.00
G_M27032_IG22:
mov rcx, rsi
mov rdx, 0xD1FFAB1E
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov rcx, rax
;; bbWeight=0.25 PerfScore 0.44
G_M27032_IG23:
mov rdx, r14
call Enumerable:ToArray(IEnumerable`1):ref
xor ebp, ebp
mov r14d, dword ptr [rbx+8]
test r14d, r14d
jle SHORT G_M27032_IG28
;; bbWeight=1 PerfScore 4.75
G_M27032_IG24:
movsxd rcx, ebp
mov r15, gword ptr [rbx+8*rcx+16]
mov rcx, qword ptr [rsi+16]
cmp qword ptr [rcx+8], 48
jle SHORT G_M27032_IG26
;; bbWeight=4 PerfScore 29.00
G_M27032_IG25:
mov r11, qword ptr [rcx+48]
test r11, r11
je SHORT G_M27032_IG26
jmp SHORT G_M27032_IG27
;; bbWeight=1.60 PerfScore 8.40
G_M27032_IG26:
mov rcx, rsi
mov rdx, 0xD1FFAB1E
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov r11, rax
;; bbWeight=0.40 PerfScore 0.70
G_M27032_IG27:
mov rcx, rdi
mov rdx, r15
mov r8d, 1
call qword ptr [r11]
inc ebp
cmp r14d, ebp
jg SHORT G_M27032_IG24
;; bbWeight=4 PerfScore 21.00
G_M27032_IG28:
xor ebp, ebp
;; bbWeight=1 PerfScore 0.25
G_M27032_IG29:
xor r15d, r15d
test r14d, r14d
jle SHORT G_M27032_IG34
;; bbWeight=4 PerfScore 6.00
G_M27032_IG30:
movsxd rcx, r15d
mov r12, gword ptr [rbx+8*rcx+16]
mov rcx, qword ptr [rsi+16]
cmp qword ptr [rcx+8], 56
jle SHORT G_M27032_IG32
;; bbWeight=16 PerfScore 116.00
G_M27032_IG31:
mov r11, qword ptr [rcx+56]
test r11, r11
je SHORT G_M27032_IG32
jmp SHORT G_M27032_IG33
;; bbWeight=6.40 PerfScore 33.60
G_M27032_IG32:
mov rcx, rsi
mov rdx, 0xD1FFAB1E
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov r11, rax
;; bbWeight=1.60 PerfScore 2.80
G_M27032_IG33:
mov rcx, rdi
mov rdx, r12
call qword ptr [r11]
inc r15d
cmp r14d, r15d
jg SHORT G_M27032_IG30
;; bbWeight=16 PerfScore 80.00
G_M27032_IG34:
inc ebp
cmp ebp, 10
jl SHORT G_M27032_IG29
;; bbWeight=4 PerfScore 6.00
G_M27032_IG35:
add rsp, 48
pop rbx
pop rbp
pop rsi
pop rdi
pop r12
pop r14
pop r15
ret
;; bbWeight=1 PerfScore 4.75
; Total bytes of code 624, prolog size 28, PerfScore 437.71, (MethodHash=de569667) for method Test:TestDict(IDictionary`2,Func`2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment