Use LLVM Machine Code Analyzer to analyze assembly performance on Arm
Introduction
Background
Run MCA with Arm assembly
Use MCA with Compiler Explorer
Next Steps
Use LLVM Machine Code Analyzer to analyze assembly performance on Arm
Who is this for?
This is an introductory topic for developers who want to diagnose performance issues of Arm programs using LLVM Machine Code Analyzer (MCA) and Compiler Explorer.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Estimate the hardware resource pressure and the number of cycles taken to execute your code snippet using llvm-mca.
- Describe how this estimate can help diagnose possible performance issues.
- Use Compiler Explorer to run llvm-mca.
Prerequisites
Before starting, you will need the following:
- Familiarity with Arm assembly.
- LLVM version 16 or newer, which includes support for Neoverse V2.
Summary
This summary was 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.
llvm-mca) to reason about Arm assembly performance. You’ll analyze a short six-value sum to estimate cycles and resource pressure, identify bottlenecks, and relate the report to pipeline behavior. You’ll also run llvm-mca in Compiler Explorer to compare compiler versions and apply the workflow to other Arm assembly fragments.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.
llvm-mca prints estimated cycles and hardware resource pressure for the add instructions. Use those metrics to identify possible stalls and the most stressed resources.llvm-mca tool integration to analyze your code. You can choose compilers and tools without installing them locally.sum_test1.s. Make sure the registers match the example so the analysis reflects the intended sequence.llvm-mca and lets you try compiler versions in the browser. For Neoverse V2 support, use LLVM 16 or later.