Automatic compiler optimization on embedded software through k-means clustering
|M. Werner, L. Servadei, R. Wille, W. Ecker. Automatic compiler optimization on embedded software through k-means clustering. DOI https://doi.org/10.1145/3380446.3430631, 11, 2020.|
|Buch||MLCAD '20: Proceedings of the 2020 ACM/IEEE Workshop on Machine Learning for CAD|
Generating instead of implementing variable design platforms is becoming increasingly popular in the development of System on Chips. This shift also poses the challenge of rapid compiler optimization that adapts to each newly generated platform. In this paper, we evaluate the impact of 104 compiler flags on memory usage and core execution time against standard optimization levels. Each flag has a different influence on these costs, which is difficult to predict. In this work, we apply cost estimation methods to predict the impact of each flag on the generated core using unsupervised Machine Learning, in the form of k-means clustering. The key strengths of the approach are the low need for data, the adaptability to new cores, and the ease of use. This helps the designer to understand the impact of flags on related applications, showing which combination is optimizing the most. As a result, we can obtain 20,93% optimization on the software size, 3,10% on the performance, and 1,75% on their trade-off beyond the -O3 optimization.