{"title":"基于机器学习的特征挖掘编译优化","authors":"Fengqian Li, F. Tang, Yao Shen","doi":"10.1109/IMIS.2014.26","DOIUrl":null,"url":null,"abstract":"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 plug in 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.","PeriodicalId":345694,"journal":{"name":"2014 Eighth International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing","volume":"2 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-07-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"8","resultStr":"{\"title\":\"Feature Mining for Machine Learning Based Compilation Optimization\",\"authors\":\"Fengqian Li, F. Tang, Yao Shen\",\"doi\":\"10.1109/IMIS.2014.26\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"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 plug in 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.\",\"PeriodicalId\":345694,\"journal\":{\"name\":\"2014 Eighth International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing\",\"volume\":\"2 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2014-07-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"8\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2014 Eighth International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/IMIS.2014.26\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2014 Eighth International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/IMIS.2014.26","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Feature Mining for Machine Learning Based Compilation Optimization
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 plug in 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.