Optimize AArch64 binaries with LLVM BOLT
Introduction
Understand BOLT optimization for Arm
Prepare your environment
Identify programs for BOLT optimization
Optimize with BRBE profiling
Optimize with instrumentation profiling
Optimize with ETM profiling
Optimize with SPE profiling
Optimize with PMU profiling
Verify BOLT optimization results
Create heatmaps with BOLT
Next Steps
Optimize AArch64 binaries with LLVM BOLT
Introduction
Understand BOLT optimization for Arm
Prepare your environment
Identify programs for BOLT optimization
Optimize with BRBE profiling
Optimize with instrumentation profiling
Optimize with ETM profiling
Optimize with SPE profiling
Optimize with PMU profiling
Verify BOLT optimization results
Create heatmaps with BOLT
Next Steps
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Use LLVM BOLT 22.1.0 or later. If your distribution provides an older version, install LLVM from a prebuilt release using the
LLVM install guide
.
You’ll find outputs in three directories: out for binaries, prof for profile data, and heatmap for visualization artifacts. Keeping these separate makes it easier to rerun steps and compare results. There is also an optional html directory if you want to make HTML files of generated heatmaps.
Check a small set of Arm TopDown indicators related to instruction delivery and code locality. Programs that appear front-end bound, with inefficient instruction fetch and poor locality, are strong candidates for code layout optimization with BOLT.
Use the profiling method supported by your system. If BRBE, SPE, or ETM are unavailable, you can use instrumentation or PMU event sampling to collect profiles.
You should be able to evaluate changes using performance metrics and profiling data. Look for improvements in instruction delivery indicators and evidence of better code locality in the optimized binary.