Feature Mining for Machine Learning based Compilation Optimization

被引:6
作者
Li, Fengqian [1 ]
Tang, Feilong [1 ]
Shen, Yao [1 ]
机构
[1] Shanghai Jiao Tong Univ, Dept Comp Sci & Engn., Shanghai, Peoples R China
来源
2014 EIGHTH INTERNATIONAL CONFERENCE ON INNOVATIVE MOBILE AND INTERNET SERVICES IN UBIQUITOUS COMPUTING (IMIS) | 2014年
关键词
Compiler optimization; Machine learning; Feature mining;
D O I
10.1109/IMIS.2014.26
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Compilation optimization is critical for software performance. Before a product releases, the most effective algorithm combination should be chosen to minimize the object file size or to maximize the running speed. Compilers like GCC usually have hundreds of optimization algorithms, in which they have complex relationships. Different combinations of algorithms will lead to object files with different performance. Usually developers select the combination manually, but it's unpractical since a combination for one project can't be reused for another one. In order to conquer this difficulty some approaches like iterative search, heuristic search and machine learning based optimization have been proposed. However these methods still need improvements at different aspects like speed and precision. This paper researches machine learning based compilation optimization especially on feature processing which is important for machine learning methods. Program features can be divided into static features and dynamic features. Apart from user defined static features, we design a method to generate lots of static features by template and select best ones from them. Furthermore, we observe that feature value changes during different optimization phases and implement a feature extractor to extract feature values at specific phases and predict optimization plan dynamically. Finally, we implement the prototype on GCC version 4.6 with GCC plugin system and evaluate it with benchmarks. The results show that our system has a 5% average speed up for object file running speed than GCC O3 optimization level.
引用
收藏
页码:207 / 214
页数:8
相关论文
共 20 条
[1]  
Agakov F, 2006, INT SYM CODE GENER, P295
[2]   Finding effective compilation sequences [J].
Almagor, L ;
Cooper, KD ;
Grosul, A ;
Harvey, TJ ;
Reeves, SW ;
Subramanian, D ;
Torczon, L ;
Waterman, T .
ACM SIGPLAN NOTICES, 2004, 39 (07) :231-239
[3]  
[Anonymous], 2013, J WIRELESS MOBILE NE
[4]  
[Anonymous], 2013, J WIRELESS MOBILE NE
[5]  
Cavazos J, 2007, INT SYM CODE GENER, P185
[6]   Method-specific dynamic compilation using logistic regression [J].
Cavazos, John ;
O'Boyle, Michael F. P. .
ACM SIGPLAN NOTICES, 2006, 41 (10) :229-240
[7]   LIBSVM: A Library for Support Vector Machines [J].
Chang, Chih-Chung ;
Lin, Chih-Jen .
ACM TRANSACTIONS ON INTELLIGENT SYSTEMS AND TECHNOLOGY, 2011, 2 (03)
[8]   Evaluating Iterative Optimization Across 1000 Data Sets [J].
Chen, Yang ;
Huang, Yuanjie ;
Eeckhout, Lieven ;
Fursin, Grigori ;
Peng, Liang ;
Temam, Olivier ;
Wu, Chengyong .
ACM SIGPLAN NOTICES, 2010, 45 (06) :448-459
[9]   Optimizing for reduced code space using genetic algorithms [J].
Cooper, KD ;
Schielke, PJ ;
Subramanian, D .
ACM SIGPLAN NOTICES, 1999, 34 (07) :1-9
[10]  
Fursin Grigori, 2008, MILEPOST GCC MACHINE