Treffer: Automatic Compiler Tuning for Inlining with Machine Learning.

Title:
Automatic Compiler Tuning for Inlining with Machine Learning.
Authors:
Huang, Da1 (AUTHOR) hd_bhu@126.com, Shi, Xiaohua1 (AUTHOR) xhshi@buaa.edu.cn, Feng, Yuchen1 (AUTHOR) ycf_bhu@126.com, Zhao, Changhai2 (AUTHOR) zhao.ch@cnpc.com.cn, Wen, Jiamin2 (AUTHOR) wenjiamin@cnpc.com.cn, Shang, Minqiang2 (AUTHOR) shangminqiang@cnpc.com.cn
Source:
International Journal of Pattern Recognition & Artificial Intelligence. Sep2025, Vol. 39 Issue 11, p1-21. 21p.
Database:
Business Source Elite

Weitere Informationen

Automatic compiler tuning has become one of the hot research areas attracting extensive attention in recent years. By using machine learning models to learn from large-scale experimental samples, it can efficiently search through the massive combinations of compiler optimization parameters within limited time, identifying parameter sets that better suit the current microprocessor architecture and application programs, thereby achieving higher execution efficiency of target programs than default compilation options. This paper designs and implements an automatic compiler tuning mechanism, employing an XGBoost performance model built through a "learn-while-searching" approach to guide the search process of simulated annealing algorithm (SA). The XGBoost model can predict the performance deltas of different GCC optimization parameters, and these deltas are used to bias the annealing acceptance probability. This mechanism combines the global modeling capability of machine learning with the local search advantages of the SA, enhancing both search efficiency and effectiveness. Based on this tuning mechanism, the paper conducts in-depth research on the inlining optimization process inside the GCC compiler, proposing and implementing two automatic tuning schemes: (1) automatic tuning of inlining compilation options, which influences the number of inlined functions through different values of these options, thereby affecting program performance; (2) automatic tuning of function inlining at call sites, which uses GCC plugins technology to replace the ipa-inline pass in GCC optimization, enabling control over whether to inline functions at each call site and thus impacting program performance. Extensive experiments are conducted on benchmark suites such as SPEC CPU2006, cBench, and WRF. The results show that compared with the Critical Flag Selection-based Compiler Auto-tuning (CFSCA) method published in ASE2023, the Bayesian Optimization-based Compiler Auto-tuning (BOCA) method published in ICSE2021, and other traditional search algorithms, the proposed tuning mechanism achieves better optimization effects on most benchmarks. [ABSTRACT FROM AUTHOR]

Copyright of International Journal of Pattern Recognition & Artificial Intelligence is the property of World Scientific Publishing Company and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)