Use of Code Structural Features for Machine Learning to Predict Effective Optimizations
Yuki Kawarabatake, Mulya Agung, Kazuhiko Komatsu, Ryusuke Egawa, Hiroyuki Takizawa · 2018
Since it is difficult to explicitly express the underlying relationship between a code and appropriate optimizations for it, this paper discusses a possibility of using machine learning to predict appropriate optimizations for a given code. In this paper, selection of appropriate compiler options is taken as an example of the prediction, because it can be seen as selection of code optimizations; use of different compiler options results in enabling different compiler optimizations. One severe problem is that it is difficult to collect a sufficient number of data for a machine learning model to well understand the underlying relationships among codes and their appropriate optimizations. Therefore, in addition to conventional features of a code, such as profiling data and parameterized code features, we directly use a code structure itself to retrieve more information from a limited number of codes. The evaluation results suggest that use of code structural features can potentially improve the prediction accuracy if the training dataset contains data of similar code structures.