[Paper Review] MLComp: A Methodology for Machine Learning-based Performance Estimation and Adaptive Selection of Pareto-Optimal Compiler Optimization Sequences
MLComp proposes a reinforcement learning-based methodology for adaptive, multi-objective compiler optimization sequencing, using a fast, highly accurate machine learning performance estimator to replace time-consuming dynamic profiling. It achieves up to 12% improvement in execution time and 6% in energy consumption across x86 and RISC-V platforms, with relative error below 2% and 50× faster training than state-of-the-art models.
Embedded systems have proliferated in various consumer and industrial applications with the evolution of Cyber-Physical Systems and the Internet of Things. These systems are subjected to stringent constraints so that embedded software must be optimized for multiple objectives simultaneously, namely reduced energy consumption, execution time, and code size. Compilers offer optimization phases to improve these metrics. However, proper selection and ordering of them depends on multiple factors and typically requires expert knowledge. State-of-the-art optimizers facilitate different platforms and applications case by case, and they are limited by optimizing one metric at a time, as well as requiring a time-consuming adaptation for different targets through dynamic profiling. To address these problems, we propose the novel MLComp methodology, in which optimization phases are sequenced by a Reinforcement Learning-based policy. Training of the policy is supported by Machine Learning-based analytical models for quick performance estimation, thereby drastically reducing the time spent for dynamic profiling. In our framework, different Machine Learning models are automatically tested to choose the best-fitting one. The trained Performance Estimator model is leveraged to efficiently devise Reinforcement Learning-based multi-objective policies for creating quasi-optimal phase sequences. Compared to state-of-the-art estimation models, our Performance Estimator model achieves lower relative error (<2%) with up to 50x faster training time over multiple platforms and application domains. Our Phase Selection Policy improves execution time and energy consumption of a given code by up to 12% and 6%, respectively. The Performance Estimator and the Phase Selection Policy can be trained efficiently for any target platform and application domain.
Motivation & Objective
- To address the limitations of fixed, single-objective compiler optimization policies that require expert tuning and dynamic profiling.
- To enable fast, automated adaptation of optimization sequences across diverse platforms and application domains.
- To develop a multi-objective optimization framework that simultaneously improves execution time, energy consumption, and code size.
- To reduce reliance on time-intensive dynamic profiling by replacing it with fast, accurate machine learning-based performance estimation.
Proposed method
- A machine learning-based Performance Estimator (PE) model is trained to predict dynamic program features such as execution time, energy consumption, and code size using static compiler metrics.
- The PE model automatically selects the optimal data preprocessing method and machine learning algorithm (e.g., XGBoost, LightGBM) through a heuristic search to maximize prediction accuracy.
- A Reinforcement Learning (RL)-based Phase Selection Policy (PSS) is trained using the PE model to recommend Pareto-optimal sequences of compiler optimization phases.
- The PSS policy is trained in a simulated environment using the PE model’s predictions, enabling fast policy adaptation without repeated dynamic profiling.
- The framework supports automated, platform-agnostic deployment by retraining the PE and PSS models for new targets using minimal profiling data.
- The methodology enables end-to-end, automated, and reusable optimization adaptation across different compilers, platforms, and application domains.
Experimental results
Research questions
- RQ1Can a machine learning-based performance estimator achieve high accuracy with minimal profiling overhead across diverse platforms and applications?
- RQ2How effective is a reinforcement learning-based policy in selecting Pareto-optimal sequences of compiler optimizations for multiple objectives?
- RQ3Can the proposed methodology reduce adaptation time compared to state-of-the-art methods that rely on extensive dynamic profiling?
- RQ4To what extent can the PE model generalize across different compiler targets and application workloads without manual reconfiguration?
- RQ5How does the multi-objective optimization performance of the PSS policy compare to single-objective state-of-the-art approaches in terms of execution time, energy, and code size?
Key findings
- The Performance Estimator model achieves a maximum relative error of less than 2% across execution time, energy consumption, code size, and number of instructions, outperforming state-of-the-art models with 2–7% error.
- The PE model reduces training time by up to 50× compared to prior work, requiring only 2 days of profiling for full model training, versus 15–108 days in previous studies.
- The Phase Selection Policy (PSS) improves execution time by up to 12% and reduces energy consumption by up to 6% compared to standard compiler optimizations.
- The PSS policy maintains or slightly improves code size (by 0.1%) while optimizing for multiple objectives, avoiding the trade-offs common in single-objective approaches.
- The methodology enables fully automated, reusable, and fast adaptation of optimization policies across different platforms (x86 and RISC-V) and application domains (PARSEC and BEEBS benchmarks).
- The framework demonstrates superior generalization and efficiency, with minimal manual intervention required for deployment on new targets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.