Confidential + Proprietary Confidential + Proprietary
Measuring instruction latencies with llvm
Guillaume Chatelet
- C. Courbet, B. De Backer, O. Sykora
Measuring instruction latencies with llvm Guillaume Chatelet C. - - PowerPoint PPT Presentation
Measuring instruction latencies with llvm Guillaume Chatelet C. Courbet, B. De Backer, O. Sykora Google Compiler Research Confidential + Proprietary Confidential + Proprietary Why? Scheduling needs latencies and Op decomposition This
Confidential + Proprietary Confidential + Proprietary
Confidential + Proprietary
○ This talk is about latency measurement only
○ May be incomplete / not be in a machine readable format
○ is tedious / requires careful guesswork and analysis.
○ scheduling information is incomplete for most X86 models
2
Confidential + Proprietary
3
Confidential + Proprietary
4
Confidential + Proprietary
5
Confidential + Proprietary
6
Confidential + Proprietary
7
Confidential + Proprietary
8
Confidential + Proprietary
9
Confidential + Proprietary
10
Confidential + Proprietary
11
Confidential + Proprietary
> llvm-exegesis -opcode-name IMUL16rri8 -benchmark-mode latency
name: latency IMUL16rri8 cpu_name: sandybridge llvm_triple: x86_64-grtev4-linux-gnu num_repetitions: 10000 measurements:
error: '' ...
12
Confidential + Proprietary
○ immediate: ±0, 1, ~1, 28,16,32,64, ±∞, nan, denorm ○ register values: SUB EAX, EAX, EAX vs SUB EAX, EAX, EBX
13
Confidential + Proprietary
14