Automatic WCET Reduction by Machine Learning Based Heuristics for Function Inlining
The application of machine learning techniques in compiler frame- works has become a challenging research area. Learning algorithms are exploited for an automatic generation of optimization heuristics which often outperform hand-crafted models. Moreover, these automatic approaches can effectively tune the compilers' heuristics after larger changes in the optim ization sequence or they can be leveraged to tailor heuristics towards a particular a rchitectural model. Pre- vious works focussed on a reduction of the average-case performance. In this paper, learning approaches are studied in the context of an automatic min- imization of the worst-case execution time (WCET) which is the upper bound of the program's maximum execution time. We show that explicitly taking the new timing model into account allows the construction of compiler heuristics that effectively reduce the WCET. This is demonstrated for the well-known opti- mization function inlining. Our WCET-driven inlining heuristics based on a fast classifier called random forests outperform standard heuristics by up to 9.1% on average in terms of the WCET reduction. Moreover, we point out that our classi- fier is highly accurate with a prediction rate for inlining ca ndidates of 84.0%.
READ FULL TEXT