Questions tagged [llvm-mca]

llvm-mca is a performance analysis tool that uses information available in LLVM (e.g. scheduling models) to statically measure the performance of machine code in a specific CPU. It was inspired by The Intel Architecture Code Analyzer (see https://stackoverflow.com/questions/tagged/iaca).

llvm-mca is a performance analysis tool that uses information available in LLVM (e.g. scheduling models) to statically measure the performance of machine code in a specific CPU. It was inspired by The Intel Architecture Code Analyzer.

5 questions
8
votes
1 answer

(How) can I predict the runtime of a code snippet using LLVM Machine Code Analyzer?

I used llvm-mca to compute the total cycles of a pice of code, thinking they would predict its runtime. However, measuring the runtime dynamically showed almost no correlation. So: Why does the total cycles computed by llvm-mca not accurately…
DaveFar
  • 7,078
  • 4
  • 50
  • 90
1
vote
0 answers

ADX on llvm-mca: Is its reciprocal throughput 1 or 0.5?

intel.com: Skylake Throughput (CPI) 0.5 But llvm-mca returns $ llvm-mca kkk -mcpu=skylake -timeline --timeline-max-iterations=10 --timeline-max-cycles=999 ... Timeline view: 0123456789 0123456789 0123456789 …
l4m2
  • 1,157
  • 5
  • 17
1
vote
0 answers

llvm-mca for ARM Cortex-M cores

I'd like to use the llvm-mca tool to view execution timelines for instruction sequences in ARM Cortex-M cores, e.g. the Cortex-M4. I can see that there is support for in-order cores, but I'm not sure if these cores are supported by llvm-mca.…
swineone
  • 2,296
  • 1
  • 18
  • 32
1
vote
0 answers

Using llvm-mca on NASM source file

I have some assembler code in NASM format that I want to analyse using LLVM-MCA. So I need to run it through NASM to resolve the macros and produce something that LLVM-MCA can accept, but the only output options seem to be binary files rather than…
Tim
  • 26,753
  • 2
  • 16
  • 29
1
vote
1 answer

Using llvm-mca with CMake

I am trying to set up llvm-mca to work with CMake. The official documentation gives simple commands to output the info such as. $ clang foo.c -O2 -target x86_64-unknown-unknown -S -o - | llvm-mca -mcpu=btver2 This works great for simple files.…
user6574932
  • 61
  • 1
  • 5