Computer Science ›› 2026, Vol. 53 ›› Issue (6A): 260300057-9.doi: 10.11896/jsjkx.260300057

• Computer Software & Architecture • Previous Articles     Next Articles

Research on Intelligent Compiler Optimization Techniques Based on Program Features

HUANG Liangming, ZHANG Jiahui, CAI Chunhao   

  1. Wuxi Institute of Advanced Technology,Wuxi,Jiangsu 214122,China
  • Online:2026-06-16 Published:2026-06-12
  • About author:HUANG Liangming,born in 1988,Ph.D,assistant researcher.His main research interests include compiler design and optimization,and inference optimization for large language models.
  • Supported by:
    Key Project of the Ministry of Science and Technology(GG20210701) and National Key Research and Development Program(2020YFB0204602).

Abstract: Traditional compiler optimizations face challenges such as rigid rules,limited adaptability across scenarios,and the efficiency ceiling imposed by manual design,making it difficult to meet the diverse demands of efficient compilation for different programs.To address this,researchers have proposed algorithms such as auto-tuning and Bayesian optimization to search for optimal optimization flags and parameters.However,existing methods suffer from two major drawbacks.Firstly,they require iterative execution of the target code,which is computationally expensive and infeasible for large-scale programs.Secondly,they treat programs as black boxes,leading to dependence on initial configurations,susceptibility to local optima,and the need for re-optimization when applied to new programs.To overcome these limitations,this paper proposes an intelligent compiler optimization technique based on program features.The approach involves collecting program feature information through the compiler and training a deep learning model on a dataset containing both program features and high-performing optimization flag combinations,enabling the model to predict suitable optimization options based on input program characteristics.Furthermore,for optimization processes such as loop unrolling,fine-grained parameter tuning is achieved by combining machine learning models with program features to enable intelligent selection of key parameters.Evaluated on the standard-scale SPEC CPU2017 integer benchmark suite,the proposed method achieves a 7.2% performance improvement over the O3 optimization level,with an average model inference time of only 7.11 seconds and a feature extraction overhead of just 1.02% of total compilation time.Experimental results demonstrate that the technique can effectively predict appropriate optimization flags and parameters for different programs,offering significant cost advantages over existing approaches.

Key words: Compiler optimization, Program features, Learning-based optimization, Compiler configuration selection, Performance prediction

CLC Number: 

  • TP314
[1] AHO A V,LAM M S,SETHI R,et al.Compilers:principles,techniques,and tools[M].Beijing:China Machine Press,2011.
[2] HALL M,PADUA D,PINGALI K.Compiler research:the next 50 years[J].Communications of the ACM,2009,52(2):60-67.
[3] GNU PROJECT.GNU Compiler Collection[EB/OL].[2026-04-09] .https://gcc.gnu.org/.
[4] LLVM PROJECT.LLVM:low level virtual machine[EB/OL].[2026-04-09] .https://llvm.org/.
[5] LATTNER C.LLVM and clang:next generation compiler technology[C]//The BSD Conference.2008:1-20.
[6] CHI H Y,CHEN C B.Survey on Automatic Tuning of Compi-lers by Machine Learning[J].Computer Science,2022,49(1):241-251.
[7] GAO G J,REN Z L,ZHANG J X,et al.Selection of com-piler-optimization sequences[J].SCIENTIA SINICA Informationis,2019,49(10):1267-1282.
[8] GARCIARENA U,SANTANA R.Evolutionaryoptimization ofcompiler flag selection by learning and exploiting flags interactions[C]//Proceedings of the 2016 on Genetic and Evolutionary Computation Conference Companion.2016:1159-1166.
[9] ASHOURI A H,KILLIAN W,CAVAZOS J,et al.A survey on compiler autotuning using machine learning[J].ACM computing surveys,2018,51(5):96:1-96:42.
[10] ASHOURI A H,HUA Y,WANG X,et al.MLGOPerf:an ML guided inliner to optimize performance[J].arXiv:2207.08389,2022.
[11] WANG Z,BOYLE M O.Machine learning in compiler optimization[C]//Proceedings of the IEEE.2018:1879-1901.
[12] ANSEL J,KAMIL S,VEERAMACHANENI K,et al.Open-Tuner:An extensible framework for program autotuning[C]//Proceedings of the 23rd International Conference on Parallel Architectures and Compilation.2014:303-315.
[13] KALYAN M,WANG X,ELTANTAWY A.Code region based auto-tuning enabled compilers[C]//Workshop on the Intersection of High Performance Computing and Machine Learning(HPCaML).ACM,2019.
[14] PARK S,LATIFI S,PARK Y,et al.SRTuner:effective compiler optimization customization by exposing synergistic relations[C]//2022 IEEE/ACM International Symposium on Code Generation and Optimization(CGO).2022:118-130.
[15] CHEN J J,XU N X,CHEN P Q,et al.Efficient compiler autotuning via bayesian optimization[C]//2021 IEEE/ACM 43rd International Conference on Software Engineering(ICSE).IEEE,2021:1198-1209.
[16] SEEKER V,CUMMINS C,COLE M,et al.Revealing compiler heuristics through automated discovery and optimization[C]//2024 IEEE/ACM International Symposium on Code Generation and Optimization(CGO).2024:55-66.
[17] ZHENG Z C,WU Y,ZHANG X W.mLOOP:optimize loop unrolling in compilation with a ML-based approach[C]//2024 International Conference on Networking,Architecture and Storage(NAS).2024.
[18] TROFIN M,QIAN Y,BREVDO E,et al.MLGO:a machinelearning guided compiler optimizations framework[J].arXiv:2101.04808,2021.
[19] HUANG L M,JIANG J,GAO X W.Structure Peeling Based on Link Time Optimization in the GCC compiler[C]//2022 3rd International Conference on Information Science,Parallel and Distributed Systems(ISPDS).2022:317-322.
[20] HENNING J.Spec cpu2006 benchmark descriptions[J].ACM SIGARCH Computer ArchitectureNews,2006,34(4):1-17.
[21] FURSIN G,TEMAM O.Collective optimization:a practical collaborative approach[J].ACM Transactions on Architecture and Code Optimization(TACO),2010,7(4):20:1-20:20.
[22] GEWERS F L,FERREIRA G R,DE ARRUDA H F,et al.Principal component analysis:a natural approach to data exploration[J].ACM Computing Surveys,2011,50(4):70:1-70:34.
[23] CHEN T Q,GUESTRIN C.XGBoost:a scalable tree boosting system[C]//Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining(KDD'16).2016:785-794.
[24] STANDARD PERFORMANCE EVALUATION CORPORA-TION(SPEC).SPEC CPU2017 Benchmark Suite[EB/OL].[2026-03-11] .https://www.spec.org/cpu2017/.
[25] LIMAYE A,ADEGBIJA T.A workload characterization of the SPEC CPU2017 benchmark suite[C]//2018 IEEE International Symposium on Performance Analysis of Systems and Software(ISPASS).2018:149-158.
[26] JIANG J,GU X Y,XU K K,et al.Design and Research ofSIMD Programming Interface for Sunway [J].Computer Science,2025,52(6):66-73.
[27] WEICKER R P.Dhrystone:a synthetic systems programmingbenchmark[J].Communications of the ACM,1984,27(10):1013-1030.
[1] LI Fan. Academic Performance Prediction Model Based on Dynamic Graph Isomorphism Network [J]. Computer Science, 2026, 53(6A): 250800035-4.
[2] ZHAI Jie, CHEN Lexuan, PANG Zhiyu. Survey on Graph Neural Network-based Methods for Academic Performance Prediction [J]. Computer Science, 2026, 53(2): 16-30.
[3] LI Chunying, TANG Zhikang, ZHUANG Zhiwei, LI Wenbo, GUO Yanxi, ZHANG Xiaowei. DCL-FKT:Personalized Knowledge Tracing via Dual Contrastive Learning and ForgettingMechanism [J]. Computer Science, 2026, 53(2): 99-106.
[4] LIU Zhengyu, ZHANG Fan, QI Xiaofeng, GAO Yanzhao, SONG Yijing, FAN Wang. Review of Research on Deep Learning Compiler [J]. Computer Science, 2025, 52(8): 29-44.
[5] CAI Chunhao, LIANG Shuping, JIANG Jun, SHAO Ningyuan. Pre-selection Optimization for Spill Heuristic on Shenwei Platform [J]. Computer Science, 2025, 52(6): 82-87.
[6] DUAN Chao, WANG Yiqing, WANG Jie, ZHANG Mingyan. Research on Hybrid Methods for Predicting Students’ Online Learning Performance Based on Generative Model [J]. Computer Science, 2025, 52(11A): 250200029-9.
[7] ZHOU Fengfan, LING Hefei, ZHANG Jinyuan, XIA Ziwei, SHI Yuxuan, LI Ping. Facial Physical Adversarial Example Performance Prediction Algorithm Based on Multi-modal Feature Fusion [J]. Computer Science, 2023, 50(8): 280-285.
[8] WANG Run-an, ZOU Zhao-nian. Query Performance Prediction Based on Physical Operation-level Models [J]. Computer Science, 2022, 49(8): 49-55.
[9] LU Hao-song, HU Yong-hua, WANG Shu-ying, ZHOU Xin-lian, LI Hui-xiang. Study on Hybrid Resource Heuristic Loop Unrolling Factor Selection Method Based on Vector DSP [J]. Computer Science, 2022, 49(6A): 777-783.
[10] ZHAO Hang, TONG Shui-guang, ZHU Zheng-zhou. Prediction Method of Structural Static Performance Based on Data Learning [J]. Computer Science, 2022, 49(4): 140-143.
[11] GAO Xiu-wu, HUANG Liang-ming, JIANG Jun. Optimization Method of Streaming Storage Based on GCC Compiler [J]. Computer Science, 2022, 49(11): 76-82.
[12] TANG Zhen, HU Yong-hua, LU Hao-song, WANG Shu-ying. Research on DSP Register Pairs Allocation Algorithm with Weak Assigning Constraints [J]. Computer Science, 2021, 48(6A): 587-595.
[13] HU Wei-fang, CHEN Yun, LI Ying-ying, SHANG Jian-dong. Loop Fusion Strategy Based on Data Reuse Analysis in Polyhedral Compilation [J]. Computer Science, 2021, 48(12): 49-58.
[14] ZHANG Bin-bin, WANG Juan, YUE Kun, WU Hao, HAO Jia. Performance Prediction and Configuration Optimization of Virtual Machines Based on Random Forest [J]. Computer Science, 2019, 46(9): 85-92.
[15] ZHANG Meng, FU Li-hua, HE Ting-ting and YANG Qing. Cognitive Modeling Based on Binary Matrix Factorization [J]. Computer Science, 2017, 44(10): 265-268.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!