JuliaPerf / MCAnalyzer.jl

A set of tools for machine code analyzing of Julia code
Other
46 stars 9 forks source link

Add missing return nothing statement #4

Closed musm closed 5 years ago

musm commented 5 years ago

otherwise the run statement from the previous line is printed, which probably not intended

musm commented 5 years ago

cc @vchuravy

musm commented 5 years ago

here is the difference in output

master


> analyze(f, Tuple{Float64})
......
-----------------------------------------------------------------------------------------
|   2      | 0.5         | 0.5  |             |             |      |      |      |      | vcvtsi2sd xmm2, xmm3, rax
|   1      | 0.5         | 0.5  |             |             |      |      |      |      | vmulsd xmm2, xmm1, xmm2
|   1      | 0.5         | 0.5  |             |             |      |      |      |      | vaddsd xmm0, xmm0, xmm2
|   1      |             |      |             |             |      | 0.5  | 0.5  |      | add rax, 0x1
|   1*     |             |      |             |             |      |      |      |      | cmp rax, 0x65
|   0*F    |             |      |             |             |      |      |      |      | jnz 0xffffffffffffffe3
Total Num Of Uops: 6
Process(`'C:\Intel\iaca-win64\iaca.exe' -arch SKL 'C:\Users\Mus\AppData\Local\Temp\jl_5C8D.tmp\a.out'`, ProcessExited(0))

PR

> analyze(f, Tuple{Float64})
...
| Num Of   |                    Ports pressure in cycles                         |      |
|  Uops    |  0  - DV    |  1   |  2  -  D    |  3  -  D    |  4   |  5   |  6   |  7   |
-----------------------------------------------------------------------------------------
|   2      | 0.5         | 0.5  |             |             |      |      |      |      | vcvtsi2sd xmm2, xmm3, rax
|   1      | 0.5         | 0.5  |             |             |      |      |      |      | vmulsd xmm2, xmm1, xmm2
|   1      | 0.5         | 0.5  |             |             |      |      |      |      | vaddsd xmm0, xmm0, xmm2
|   1      |             |      |             |             |      | 0.5  | 0.5  |      | add rax, 0x1
|   1*     |             |      |             |             |      |      |      |      | cmp rax, 0x65
|   0*F    |             |      |             |             |      |      |      |      | jnz 0xffffffffffffffe3
Total Num Of Uops: 6

(see the last line)

musm commented 5 years ago

thanks