{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,7]],"date-time":"2026-02-07T11:52:57Z","timestamp":1770465177037,"version":"3.49.0"},"reference-count":55,"publisher":"Association for Computing Machinery (ACM)","issue":"4","license":[{"start":{"date-parts":[[2024,4,18]],"date-time":"2024-04-18T00:00:00Z","timestamp":1713398400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"crossref","award":["62232001"],"award-info":[{"award-number":["62232001"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"crossref"}]},{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"crossref","award":["62322208"],"award-info":[{"award-number":["62322208"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"crossref"}]},{"name":"CCF Young Elite Scientists Sponsorship Program"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2024,5,31]]},"abstract":"<jats:p>Widely used compilers like GCC and LLVM usually have hundreds of optimizations controlled by optimization flags, which are enabled or disabled during compilation to improve the runtime performance (e.g., small execution time) of the compiler program. Due to the large number of optimization flags and their combination, it is difficult for compiler users to manually tune compiler optimization flags. In the literature, a number of autotuning techniques have been proposed, which tune optimization flags for a compiled program by comparing its actual runtime performance with different optimization flag combinations. Due to the huge search space and heavy actual runtime cost, these techniques suffer from the widely recognized efficiency problem. To reduce the heavy runtime cost, in this article we propose a lightweight learning approach that uses a small number of actual runtime performance data to predict the runtime performance of a compiled program with various optimization flag combinations. Furthermore, to reduce the search space, we design a novel particle swarm algorithm that tunes compiler optimization flags with the prediction model. To evaluate the performance of the proposed approach, CompTuner, we conduct an extensive experimental study on two popular C compilers, GCC and LLVM, with two widely used benchmarks, cBench and PolyBench. The experimental results show that CompTuner\u00a0significantly outperforms the six compared techniques, including the state-of-the-art technique BOCA.<\/jats:p>","DOI":"10.1145\/3640330","type":"journal-article","created":{"date-parts":[[2024,1,11]],"date-time":"2024-01-11T12:26:34Z","timestamp":1704975994000},"page":"1-38","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":9,"title":["Compiler Autotuning through Multiple-phase Learning"],"prefix":"10.1145","volume":"33","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-8676-4017","authenticated-orcid":false,"given":"Mingxuan","family":"Zhu","sequence":"first","affiliation":[{"name":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8295-303X","authenticated-orcid":false,"given":"Dan","family":"Hao","sequence":"additional","affiliation":[{"name":"Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education; School of Computer Science, Peking University, Beijing, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3056-9962","authenticated-orcid":false,"given":"Junjie","family":"Chen","sequence":"additional","affiliation":[{"name":"Tianjin University, Tianjin, China"}]}],"member":"320","published-online":{"date-parts":[[2024,4,18]]},"reference":[{"key":"e_1_3_3_2_2","first-page":"295","volume-title":"4th IEEE\/ACM International Symposium on Code Generation and Optimization (CGO\u201906)","author":"Agakov Felix V.","year":"2006","unstructured":"Felix V. Agakov, Edwin V. Bonilla, John Cavazos, Bj\u00f6rn Franke, Grigori Fursin, Michael F. P. O\u2019Boyle, John Thomson, Marc Toussaint, and Christopher K. I. Williams. 2006. Using machine learning to focus iterative optimization. In 4th IEEE\/ACM International Symposium on Code Generation and Optimization (CGO\u201906). IEEE Computer Society, 295\u2013305."},{"key":"e_1_3_3_3_2","doi-asserted-by":"publisher","DOI":"10.1145\/998300.997196"},{"key":"e_1_3_3_4_2","first-page":"303","volume-title":"International Conference on Parallel Architectures and Compilation (PACT\u201914)","author":"Ansel Jason","year":"2014","unstructured":"Jason Ansel, Shoaib Kamil, Kalyan Veeramachaneni, Jonathan Ragan-Kelley, Jeffrey Bosboom, Una-May O\u2019Reilly, and Saman P. Amarasinghe. 2014. OpenTuner: An extensible framework for program autotuning. In International Conference on Parallel Architectures and Compilation (PACT\u201914), Jos\u00e9 Nelson Amaral and Josep Torrellas (Eds.). ACM, 303\u2013316."},{"key":"e_1_3_3_5_2","first-page":"3","author":"Ashouri Amir Hossein","year":"2016","unstructured":"Amir Hossein Ashouri. 2016. Compiler Autotuning Using Machine Learning Techniques. Ph.D. thesis, 3\u20134.","journal-title":"Compiler Autotuning Using Machine Learning Techniques."},{"key":"e_1_3_3_6_2","doi-asserted-by":"publisher","DOI":"10.1145\/3124452"},{"key":"e_1_3_3_7_2","doi-asserted-by":"publisher","DOI":"10.1145\/3197978"},{"key":"e_1_3_3_8_2","doi-asserted-by":"publisher","DOI":"10.1145\/2928270"},{"key":"e_1_3_3_9_2","doi-asserted-by":"crossref","DOI":"10.1007\/978-3-319-71489-9","volume-title":"Automatic Tuning of Compilers Using Machine Learning","author":"Ashouri Amir H.","year":"2018","unstructured":"Amir H. Ashouri, Gianluca Palermo, John Cavazos, and Cristina Silvano. 2018. Automatic Tuning of Compilers Using Machine Learning. Springer."},{"key":"e_1_3_3_10_2","first-page":"2546","article-title":"Algorithms for hyper-parameter optimization","volume":"24","author":"Bergstra James","year":"2011","unstructured":"James Bergstra, R\u00e9mi Bardenet, Yoshua Bengio, and Bal\u00e1zs K\u00e9gl. 2011. Algorithms for hyper-parameter optimization. Advances in Neural Information Processing Systems 24 (2011), 2546\u20132554.","journal-title":"Advances in Neural Information Processing Systems"},{"key":"e_1_3_3_11_2","doi-asserted-by":"publisher","DOI":"10.1109\/CGO.2007.32"},{"key":"e_1_3_3_12_2","unstructured":"cBench. 2022. https:\/\/ctuning.org\/wiki\/index.php\/CTools:CBench"},{"key":"e_1_3_3_13_2","doi-asserted-by":"crossref","first-page":"1198","DOI":"10.1109\/ICSE43902.2021.00110","volume-title":"2021 IEEE\/ACM 43rd International Conference on Software Engineering (ICSE\u201921)","author":"Chen Junjie","year":"2021","unstructured":"Junjie Chen, Ningxin Xu, Peiqi Chen, and Hongyu Zhang. 2021. Efficient compiler autotuning via Bayesian optimization. In 2021 IEEE\/ACM 43rd International Conference on Software Engineering (ICSE\u201921). IEEE, 1198\u20131209."},{"key":"e_1_3_3_14_2","doi-asserted-by":"publisher","DOI":"10.1145\/2355585.2355594"},{"key":"e_1_3_3_15_2","first-page":"219","volume-title":"26th International Conference on Parallel Architectures and Compilation Techniques (PACT\u201917)","author":"Cummins Chris","year":"2017","unstructured":"Chris Cummins, Pavlos Petoumenos, Zheng Wang, and Hugh Leather. 2017. End-to-end deep learning of optimization heuristics. In 26th International Conference on Parallel Architectures and Compilation Techniques (PACT\u201917). IEEE Computer Society, 219\u2013232."},{"key":"e_1_3_3_16_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.compchemeng.2022.107760"},{"key":"e_1_3_3_17_2","first-page":"072114","volume-title":"IOP Conference Series: Materials Science and Engineering","volume":"768","author":"Du Qi","year":"2020","unstructured":"Qi Du and Hui Huang. 2020. Research on the realization and optimization of FFTs in ARMv8 platform. In IOP Conference Series: Materials Science and Engineering, Vol. 768. IOP Publishing, 072114."},{"key":"e_1_3_3_18_2","first-page":"268","volume-title":"Proceedings of Data Science: 6th International Conference of Pioneering Computer Scientists, Engineers and Educators (ICPCSEE\u201920), Part I 6","author":"Du Qi","year":"2020","unstructured":"Qi Du, Hui Huang, and Chun Huang. 2020. Roofline model-guided compilation optimization parameter selection method. In Proceedings of Data Science: 6th International Conference of Pioneering Computer Scientists, Engineers and Educators (ICPCSEE\u201920), Part I 6. Springer, 268\u2013282."},{"key":"e_1_3_3_19_2","first-page":"56","volume-title":"2020 IEEE\/ACM 6th Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC\u201920) and Workshop on Hierarchical Parallelism for Exascale Computing (HiPar\u201920)","author":"Engelke Alexis","year":"2020","unstructured":"Alexis Engelke and Martin Schulz. 2020. Robust practical binary optimization at run-time using LLVM. In 2020 IEEE\/ACM 6th Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC\u201920) and Workshop on Hierarchical Parallelism for Exascale Computing (HiPar\u201920). IEEE, 56\u201364."},{"key":"e_1_3_3_20_2","article-title":"Embedded hyper-parameter tuning by Simulated Annealing","volume":"1906","author":"Fischetti Matteo","year":"2019","unstructured":"Matteo Fischetti and Matteo Stringher. 2019. Embedded hyper-parameter tuning by Simulated Annealing. CoRR abs\/1906.01504. arXiv:1906.01504 http:\/\/arxiv.org\/abs\/1906.01504","journal-title":"CoRR"},{"key":"e_1_3_3_21_2","article-title":"A tutorial on Bayesian optimization","author":"Frazier Peter I.","year":"2018","unstructured":"Peter I. Frazier. 2018. A tutorial on Bayesian optimization. arXiv preprint arXiv:1807.02811.","journal-title":"arXiv preprint arXiv:1807.02811"},{"key":"e_1_3_3_22_2","doi-asserted-by":"publisher","DOI":"10.1145\/2908961.2931696"},{"key":"e_1_3_3_23_2","unstructured":"GCC. 2022. https:\/\/gcc.gnu.org"},{"key":"e_1_3_3_24_2","doi-asserted-by":"publisher","DOI":"10.1145\/3368826.3377928"},{"key":"e_1_3_3_25_2","first-page":"1431","volume-title":"44th IEEE\/ACM 44th International Conference on Software Engineering (ICSE\u201922)","author":"He Haochen","year":"2022","unstructured":"Haochen He, Zhouyang Jia, Shanshan Li, Yue Yu, Chenglong Zhou, Qing Liao, Ji Wang, and Xiangke Liao. 2022. Multi-intention-aware configuration selection for performance tuning. In 44th IEEE\/ACM 44th International Conference on Software Engineering (ICSE\u201922). ACM, 1431\u20131442."},{"key":"e_1_3_3_26_2","doi-asserted-by":"crossref","first-page":"517","DOI":"10.1109\/ICSE.2015.69","volume-title":"2015 IEEE\/ACM 37th IEEE International Conference on Software Engineering","volume":"1","author":"Henard Christopher","year":"2015","unstructured":"Christopher Henard, Mike Papadakis, Mark Harman, and Yves Le Traon. 2015. Combining multi-objective search and constraint solving for configuring large software product lines. In 2015 IEEE\/ACM 37th IEEE International Conference on Software Engineering, Vol. 1. 517\u2013528."},{"key":"e_1_3_3_27_2","doi-asserted-by":"crossref","first-page":"165","DOI":"10.1145\/1356058.1356080","volume-title":"Proceedings of the 6th Annual IEEE\/ACM International Symposium on Code Generation and Optimization","author":"Hoste Kenneth","year":"2008","unstructured":"Kenneth Hoste and Lieven Eeckhout. 2008. Cole: Compiler optimization level exploration. In Proceedings of the 6th Annual IEEE\/ACM International Symposium on Code Generation and Optimization. 165\u2013174."},{"key":"e_1_3_3_28_2","first-page":"308","volume-title":"2019 IEEE 27th Annual International Symposium on Field-programmable Custom Computing Machines (FCCM\u201919)","author":"Huang Qijing","year":"2019","unstructured":"Qijing Huang, Ameer Haj-Ali, William Moses, John Xiang, Ion Stoica, Krste Asanovic, and John Wawrzynek. 2019. Autophase: Compiler phase-ordering for hls with deep reinforcement learning. In 2019 IEEE 27th Annual International Symposium on Field-programmable Custom Computing Machines (FCCM\u201919). IEEE, 308\u2013308."},{"key":"e_1_3_3_29_2","doi-asserted-by":"crossref","first-page":"131","DOI":"10.1145\/2451512.2451539","volume-title":"ACM SIGPLAN\/SIGOPS International Conference on Virtual Execution Environments (co-located with ASPLOS\u201913) (VEE\u201913)","author":"Jantz Michael R.","year":"2013","unstructured":"Michael R. Jantz and Prasad A. Kulkarni. 2013. Performance potential of optimization phase selection during dynamic JIT compilation. In ACM SIGPLAN\/SIGOPS International Conference on Virtual Execution Environments (co-located with ASPLOS\u201913) (VEE\u201913), Steve Muir, Gernot Heiser, and Stephen M. Blackburn (Eds.). ACM, 131\u2013142."},{"key":"e_1_3_3_30_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICNN.1995.488968"},{"key":"e_1_3_3_31_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.physa.2011.12.004"},{"key":"e_1_3_3_32_2","unstructured":"LLVM. 2022. https:\/\/llvm.org"},{"key":"e_1_3_3_33_2","first-page":"41","volume-title":"International Conference on Artificial Intelligence: Methodology, Systems, and Applications","author":"Monsifrot Antoine","year":"2002","unstructured":"Antoine Monsifrot, Fran\u00e7ois Bodin, and Rene Quiniou. 2002. A machine learning approach to automatic production of compiler heuristics. In International Conference on Artificial Intelligence: Methodology, Systems, and Applications. Springer, 41\u201350."},{"key":"e_1_3_3_34_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2018.2870895"},{"key":"e_1_3_3_35_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.compbiolchem.2021.107619"},{"issue":"5","key":"e_1_3_3_36_2","first-page":"1269","article-title":"Evolutionary algorithm for optimization of energy consumption at GCC compile time based on frequent pattern mining","volume":"30","author":"Ni Youcong","year":"2019","unstructured":"Youcong Ni, Rui Wu, Xin Du, Peng Ye, Wangbiao Li, and Ruliang Xiao. 2019. Evolutionary algorithm for optimization of energy consumption at GCC compile time based on frequent pattern mining. Journal of Software 30, 5 (2019), 1269\u20131287.","journal-title":"Journal of Software"},{"key":"e_1_3_3_37_2","unstructured":"Numpy. 2022. https:\/\/numpy.org"},{"key":"e_1_3_3_38_2","doi-asserted-by":"publisher","DOI":"10.1145\/7902.7904"},{"key":"e_1_3_3_39_2","first-page":"1","volume-title":"11th ACM\/SPEC International Conference on Performance Engineering (ICPE\u201920)","author":"Pereira Juliana Alves","year":"2020","unstructured":"Juliana Alves Pereira, Mathieu Acher, Hugo Martin, and Jean-Marc J\u00e9z\u00e9quel. 2020. Sampling effect on performance prediction of configurable systems: A case study. In 11th ACM\/SPEC International Conference on Performance Engineering (ICPE\u201920). ACM, 1\u201313."},{"key":"e_1_3_3_40_2","first-page":"202","volume-title":"International Conference on Artificial Evolution (Evolution Artificielle)","author":"C\u00e1ceres Leslie P\u00e9rez","year":"2017","unstructured":"Leslie P\u00e9rez C\u00e1ceres, Federico Pagnozzi, Alberto Franzin, and Thomas St\u00fctzle. 2017. Automatic configuration of GCC using Irace. In International Conference on Artificial Evolution (Evolution Artificielle). Springer, 202\u2013216."},{"key":"e_1_3_3_41_2","doi-asserted-by":"publisher","DOI":"10.1007\/s11721-007-0002-0"},{"key":"e_1_3_3_42_2","unstructured":"PolyBench. 2022. https:\/\/web.cse.ohio-state.edu\/\u223cpouchet.2\/software\/polybench\/"},{"key":"e_1_3_3_43_2","doi-asserted-by":"publisher","DOI":"10.1145\/2400682.2400715"},{"key":"e_1_3_3_44_2","first-page":"599","volume-title":"Proceedings of the International Conference on Soft Computing for Problem Solving (SocProS\u201911)","author":"Sandran Thayalan","year":"2012","unstructured":"Thayalan Sandran, Nordin Zakaria, and Anindya Jyoti Pal. 2012. An optimized tuning of genetic algorithm parameters in compiler flag selection based on compilation and execution duration. In Proceedings of the International Conference on Soft Computing for Problem Solving (SocProS\u201911). Springer, 599\u2013610."},{"key":"e_1_3_3_45_2","article-title":"Fine-tuning deep learning model parameters for improved super-resolution of dynamic MRI with prior-knowledge","volume":"2102","author":"Sarasaen Chompunuch","year":"2021","unstructured":"Chompunuch Sarasaen, Soumick Chatterjee, Mario Breitkopf, Georg Rose, Andreas N\u00fcrnberger, and Oliver Speck. 2021. Fine-tuning deep learning model parameters for improved super-resolution of dynamic MRI with prior-knowledge. CoRR abs\/2102.02711. arXiv:2102.02711 https:\/\/arxiv.org\/abs\/2102.02711","journal-title":"CoRR"},{"key":"e_1_3_3_46_2","doi-asserted-by":"publisher","DOI":"10.1145\/800192.805690"},{"key":"e_1_3_3_47_2","unstructured":"scikit learn. 2022. https:\/\/scikit-learn.org\/stable\/"},{"key":"e_1_3_3_48_2","doi-asserted-by":"publisher","DOI":"10.1109\/JPROC.2015.2494218"},{"key":"e_1_3_3_49_2","doi-asserted-by":"crossref","first-page":"1945","DOI":"10.1109\/CEC.1999.785511","volume-title":"Proceedings of the 1999 Congress on Evolutionary Computation (CEC\u201999) (Cat. No. 99TH8406)","volume":"3","author":"Shi Yuhui","year":"1999","unstructured":"Yuhui Shi and Russell C. Eberhart. 1999. Empirical study of particle swarm optimization. In Proceedings of the 1999 Congress on Evolutionary Computation (CEC\u201999) (Cat. No. 99TH8406), Vol. 3. IEEE, 1945\u20131950."},{"key":"e_1_3_3_50_2","doi-asserted-by":"publisher","DOI":"10.1145\/2786805.2786845"},{"key":"e_1_3_3_51_2","article-title":"Practical Bayesian optimization of machine learning algorithms","author":"Snoek Jasper","year":"2012","unstructured":"Jasper Snoek, Hugo Larochelle, and Ryan P. Adams. 2012. Practical Bayesian optimization of machine learning algorithms. Advances in Neural Information Processing Systems 25 (2012), 2951-2959.","journal-title":"Advances in Neural Information Processing Systems"},{"key":"e_1_3_3_52_2","doi-asserted-by":"publisher","DOI":"10.1109\/IPDPS.2009.5161054"},{"key":"e_1_3_3_53_2","first-page":"630","volume-title":"37th IEEE International Conference on Computer Design (ICCD\u201919)","author":"Vazquez Ruben","year":"2019","unstructured":"Ruben Vazquez, Ann Gordon-Ross, and Greg Stitt. 2019. Energy prediction for cache tuning in embedded systems. In 37th IEEE International Conference on Computer Design (ICCD\u201919). IEEE, 630\u2013637."},{"key":"e_1_3_3_54_2","first-page":"12","article-title":"Automatic tuning of hyperparameters using Bayesian optimization","volume":"12","author":"Victoria Helen","year":"2021","unstructured":"Helen Victoria and Ganesh Maragatham. 2021. Automatic tuning of hyperparameters using Bayesian optimization. Evolving Systems 12 (2021), 12\u201330.","journal-title":"Evolving Systems"},{"key":"e_1_3_3_55_2","doi-asserted-by":"crossref","first-page":"2919","DOI":"10.23919\/ACC50511.2021.9482827","volume-title":"2021 American Control Conference (ACC\u201921)","author":"Wang Yu","year":"2021","unstructured":"Yu Wang, Shu Jiang, Weiman Lin, Yu Cao, Longtao Lin, Jiangtao Hu, Jinghao Miao, and Qi Luo. 2021. A learning-based automatic parameters tuning framework for autonomous vehicle control in large scale system deployment. In 2021 American Control Conference (ACC\u201921). IEEE, 2919\u20132926."},{"key":"e_1_3_3_56_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.mcm.2010.07.022"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3640330","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3640330","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T22:50:26Z","timestamp":1750287026000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3640330"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,4,18]]},"references-count":55,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2024,5,31]]}},"alternative-id":["10.1145\/3640330"],"URL":"https:\/\/doi.org\/10.1145\/3640330","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,4,18]]},"assertion":[{"value":"2022-10-28","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2023-12-27","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-04-18","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}