LLVM-EXEgesis - IACA analysis
About the project
IACA is a static performance analysis tool that Intel provides to developers for analysing low-level performance problems with their code. It contains specialized models for several high-end Intel CPUs, including instruction latencies. The goal of the project is to be able to compare these latencies with the data that are currently in LLVM, and with other simulators and benchmarks.
IACA is distributed only in binary form, neither the CPU models it contains have been open-sourced, and we can observe them only by running the models on certain pieces of code.
Project plan
The simplest way to analyse the data from IACA would be to get them into llvm-exegesis, as it already has functions for generating the benchmarked code, and also for analysing the output. It could be done as another BenchmarkRunner for llvm-exegesis, that:
- Produces an object file in the right format that can be processed by IACA. Llvm-exegesis already produces an object file that contains the benchmarked code, but this file does not have the IACA start/end markers. We would need to modify this function to be able to add the markers
- Runs IACA on that file: Implement a BenchmarkRunner that runs the IACA code. This could be as simple as launching the IACA binary, the path to which will be specified via command-line flag. (Because we cannot include/distribute the IACA binary)
- Parses the outputs and extracts the information needed by llvm-exegesis (the latency and the port pressure) and uses the llvm-exegesis analysis tools to process that information.
Use "llvm/Support/raw_ostream.h"