PreTuner: Compiler Flag Auto-Tuning Based on Iterative Compilation and Predictive Model
Compiler developers have designed and implemented numerous compiler optimization techniques and provided several standard compilation flag combinations to simplify the user workflow. However, achieving the desired optimization results is difficult when using the standard compiler flag combinations provided or manually selecting the compiler flag combinations. Thus, we propose PreTuner, a general compilation flag optimization framework based on iterative compilation and predictive models. Using the optimization results from evolutionary algorithms to build a dataset of code features and compilation flag combinations, we can optimize any program in one round by extracting code features and combining them with compilation flags. PreTuner effectively addresses the problem of limited dataset availability and improves model generalization. Based on the GCC compiler, PreTuner achieves an average speedup of 1.098× (up to 1.252×) compared to the -O3 standard optimization flag combination on the cBench test suite, validating the feasibility and effectiveness of PreTuner.
Authors
- Yifan Bai (ORCID: https://orcid.org/0009-0008-2749-5062)
- He Pi
- Jianping Yin
- Guojian Xiao
- Kuan Li (ORCID: https://orcid.org/0000-0002-3272-4084)
Institutions
- Dongguan University of Technology (CN)
Publication Details
- Published
- 2025-05-05
- DOI
- https://doi.org/10.1109/cscwd64889.2025.11033656
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00