# A Multi-Dimensional, Per-Pass Empirical Study of the LLVM Optimization Pipeline

**Authors:** Federico Bruzzone, Walter Cazzola  
**arXiv:** [2606.31238](https://arxiv.org/abs/2606.31238)  
**Date:** 2026-06-30  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2606.31238v1/

## Key points

- Federico Bruzzone and Walter Cazzola conducted a detailed empirical study on the LLVM optimization pipeline
- Focus on impact of individual optimization passes for compiler optimization
- Targeted the widely used -O3 pipeline in C/C++, Rust, and ML stacks via MLIR
- Decomposed the pipeline into cumulative per-pass prefixes and measured various metrics across a large dataset
- Findings revealed non-monotonic behavior on compute-bound affine kernels and a small core set of passes driving most performance gains
- Final -O3 configuration is Pareto-dominated for a majority of kernels in terms of size-speedup trade-offs
- Traditional predictors like IR instruction count may not reliably forecast runtime performance
- Relationship between passes targeting runtime improvements and energy savings uncovered
- Quantified an upper bound on losses due to phase interference in the pipeline
- Insights enable more informed decision-making regarding pass pruning strategies, cost-model calibration techniques, and automated tuning processes in compiler optimization workflows

## Summary

Federico Bruzzone and Walter Cazzola conducted a detailed empirical study on the LLVM optimization pipeline, focusing on the impact of individual optimization passes. This analysis is crucial for various aspects of compiler optimization such as phase ordering, pass selection, and understanding pass/hardware interactions. The researchers specifically targeted the widely used -O3 pipeline in C/C++, Rust, and ML stacks via MLIR. To conduct their study, they decomposed the pipeline into cumulative per-pass prefixes and measured various metrics across a large dataset of 84,750 measurements with rigorous noise mitigation techniques in place. Their findings revealed intriguing patterns within the pipeline, including non-monotonic behavior on compute-bound affine kernels and a small core set of passes driving most performance gains. They also highlighted that the final -O3 configuration is Pareto-dominated for a majority of kernels in terms of size-speedup trade-offs. Additionally, traditional predictors like IR instruction count may not reliably forecast runtime performance according to their analysis. The researchers also uncovered an interesting relationship between passes targeting runtime improvements and energy savings. Furthermore, they quantified an upper bound on losses due to phase interference in the pipeline. Overall, these insights enable more informed decision-making regarding pass pruning strategies, cost-model calibration techniques, and automated tuning processes in compiler optimization workflows. By shedding light on the nuanced dynamics of the LLVM -O3 optimization pipeline through their multi-dimensional empirical study,<DateTime>, Bruzzone and Cazzola pave the way for enhanced efficiency and effectiveness in compiler optimizations for diverse software development environments.
